diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b29b40b6bc..ffa94233870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,26 @@ -## 2.36.0 (Unreleased) +## 2.37.0 (Unreleased) ENHANCEMENTS: -* data-source/aws_iam_group: Add `users` attribute [GH-7132] -* resource/aws_apigateway_stage: Add `arn` attribute [GH-10570] -* resource/aws_apigateway_usage_plan: Add `tags` argument and `arn` attribute [GH-10566] -* resource/aws_s3_bucket: Retry reading tags on `NoSuchBucket` errors due to eventual inconsistency [GH-10863] -* resource/aws_waf_rule: Add `arn` attribute [GH-10798] -* resource/aws_waf_rule_group: Add `arn` attribute [GH-10799] +* resource/aws_dlm_lifecycle_policy: Add `tags` argument and `arn` attribute [GH-10864] +* resource/aws_glue_crawler: Add `tags` argument [GH-10805] + +BUG FIXES: + +* data-source/aws_iam_policy_document: Prevent panic when combining single principal identifier with multiple principal identifiers [GH-10780] +* data-source/aws_iam_policy_document: Prevent losing identifier elements when combining single and multiple principals identifiers [GH-10844] +* resource/aws_servicequotas_service_quota: Remove resource from Terraform state on `NoSuchResourceException` error [GH-10735] + +## 2.36.0 (November 14, 2019) + +ENHANCEMENTS: + +* data-source/aws_iam_group: Add `users` attribute ([#7132](https://github.com/terraform-providers/terraform-provider-aws/issues/7132)) +* resource/aws_apigateway_stage: Add `arn` attribute ([#10570](https://github.com/terraform-providers/terraform-provider-aws/issues/10570)) +* resource/aws_apigateway_usage_plan: Add `tags` argument and `arn` attribute ([#10566](https://github.com/terraform-providers/terraform-provider-aws/issues/10566)) +* resource/aws_s3_bucket: Retry reading tags on `NoSuchBucket` errors due to eventual inconsistency ([#10863](https://github.com/terraform-providers/terraform-provider-aws/issues/10863)) +* resource/aws_waf_rule: Add `arn` attribute ([#10798](https://github.com/terraform-providers/terraform-provider-aws/issues/10798)) +* resource/aws_waf_rule_group: Add `arn` attribute ([#10799](https://github.com/terraform-providers/terraform-provider-aws/issues/10799)) ## 2.35.0 (November 07, 2019) diff --git a/aws/config.go b/aws/config.go index c526f493391..47c0a73f642 100644 --- a/aws/config.go +++ b/aws/config.go @@ -72,6 +72,7 @@ import ( "github.com/aws/aws-sdk-go/service/glacier" "github.com/aws/aws-sdk-go/service/globalaccelerator" "github.com/aws/aws-sdk-go/service/glue" + "github.com/aws/aws-sdk-go/service/greengrass" "github.com/aws/aws-sdk-go/service/guardduty" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/inspector" @@ -241,6 +242,7 @@ type AWSClient struct { globalacceleratorconn *globalaccelerator.GlobalAccelerator glueconn *glue.Glue guarddutyconn *guardduty.GuardDuty + greengrassconn *greengrass.Greengrass iamconn *iam.IAM ignoreTagPrefixes keyvaluetags.KeyValueTags ignoreTags keyvaluetags.KeyValueTags @@ -436,6 +438,7 @@ func (c *Config) Client() (interface{}, error) { glacierconn: glacier.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["glacier"])})), glueconn: glue.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["glue"])})), 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), diff --git a/aws/data_source_aws_iam_policy_document_test.go b/aws/data_source_aws_iam_policy_document_test.go index c3b664948c2..d6dbab08edd 100644 --- a/aws/data_source_aws_iam_policy_document_test.go +++ b/aws/data_source_aws_iam_policy_document_test.go @@ -144,6 +144,42 @@ func TestAccAWSDataSourceIAMPolicyDocument_duplicateSid(t *testing.T) { }) } +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/10777 +func TestAccAWSDataSourceIAMPolicyDocument_Statement_Principal_Identifiers_StringAndSlice(t *testing.T) { + dataSourceName := "data.aws_iam_policy_document.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIAMPolicyDocumentConfigStatementPrincipalIdentifiersStringAndSlice, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "json", testAccAWSIAMPolicyDocumentExpectedJSONStatementPrincipalIdentifiersStringAndSlice), + ), + }, + }, + }) +} + +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/10777 +func TestAccAWSDataSourceIAMPolicyDocument_Statement_Principal_Identifiers_MultiplePrincipals(t *testing.T) { + dataSourceName := "data.aws_iam_policy_document.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIAMPolicyDocumentConfigStatementPrincipalIdentifiersMultiplePrincipals, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "json", testAccAWSIAMPolicyDocumentExpectedJSONStatementPrincipalIdentifiersMultiplePrincipals), + ), + }, + }, + }) +} + func TestAccAWSDataSourceIAMPolicyDocument_Version_20081017(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -806,3 +842,93 @@ data "aws_iam_policy_document" "test" { } } ` + +var testAccAWSIAMPolicyDocumentConfigStatementPrincipalIdentifiersStringAndSlice = ` +data "aws_iam_policy_document" "test" { + statement { + actions = ["*"] + resources = ["*"] + sid = "StatementPrincipalIdentifiersStringAndSlice" + + principals { + identifiers = ["arn:aws:iam::111111111111:root"] + type = "AWS" + } + + principals { + identifiers = ["arn:aws:iam::222222222222:root", "arn:aws:iam::333333333333:root"] + type = "AWS" + } + } +} +` + +var testAccAWSIAMPolicyDocumentExpectedJSONStatementPrincipalIdentifiersStringAndSlice = `{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "StatementPrincipalIdentifiersStringAndSlice", + "Effect": "Allow", + "Action": "*", + "Resource": "*", + "Principal": { + "AWS": [ + "arn:aws:iam::111111111111:root", + "arn:aws:iam::333333333333:root", + "arn:aws:iam::222222222222:root" + ] + } + } + ] +}` + +var testAccAWSIAMPolicyDocumentConfigStatementPrincipalIdentifiersMultiplePrincipals = ` +data "aws_iam_policy_document" "test" { + statement { + actions = ["*"] + resources = ["*"] + sid = "StatementPrincipalIdentifiersStringAndSlice" + + principals { + identifiers = [ + "arn:aws:iam::111111111111:root", + "arn:aws:iam::222222222222:root", + ] + type = "AWS" + } + principals { + identifiers = [ + "arn:aws:iam::333333333333:root", + ] + type = "AWS" + } + principals { + identifiers = [ + "arn:aws:iam::444444444444:root", + ] + type = "AWS" + } + + } +} +` + +var testAccAWSIAMPolicyDocumentExpectedJSONStatementPrincipalIdentifiersMultiplePrincipals = `{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "StatementPrincipalIdentifiersStringAndSlice", + "Effect": "Allow", + "Action": "*", + "Resource": "*", + "Principal": { + "AWS": [ + "arn:aws:iam::333333333333:root", + "arn:aws:iam::444444444444:root", + "arn:aws:iam::222222222222:root", + "arn:aws:iam::111111111111:root" + ] + } + } + ] +}` diff --git a/aws/iam_policy_model.go b/aws/iam_policy_model.go index 8726c082663..79e38e21f75 100644 --- a/aws/iam_policy_model.go +++ b/aws/iam_policy_model.go @@ -94,13 +94,28 @@ func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { for _, p := range ps { switch i := p.Identifiers.(type) { case []string: - if _, ok := raw[p.Type]; !ok { + switch v := raw[p.Type].(type) { + case nil: raw[p.Type] = make([]string, 0, len(i)) + case string: + // Convert to []string to prevent panic + raw[p.Type] = make([]string, 0, len(i)+1) + raw[p.Type] = append(raw[p.Type].([]string), v) } sort.Sort(sort.Reverse(sort.StringSlice(i))) raw[p.Type] = append(raw[p.Type].([]string), i...) case string: - raw[p.Type] = i + switch v := raw[p.Type].(type) { + case nil: + raw[p.Type] = i + case string: + // Convert to []string to stop drop of principals + raw[p.Type] = make([]string, 0, 2) + raw[p.Type] = append(raw[p.Type].([]string), v) + raw[p.Type] = append(raw[p.Type].([]string), i) + case []string: + raw[p.Type] = append(raw[p.Type].([]string), i) + } default: return []byte{}, fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", i) } diff --git a/aws/internal/keyvaluetags/generators/listtags/main.go b/aws/internal/keyvaluetags/generators/listtags/main.go index ea6a7fc65cb..ba44df015c2 100644 --- a/aws/internal/keyvaluetags/generators/listtags/main.go +++ b/aws/internal/keyvaluetags/generators/listtags/main.go @@ -40,6 +40,7 @@ var serviceNames = []string{ "dax", "devicefarm", "directoryservice", + "dlm", "docdb", "dynamodb", "ecr", diff --git a/aws/internal/keyvaluetags/generators/servicetags/main.go b/aws/internal/keyvaluetags/generators/servicetags/main.go index a074e68aad8..3a9fab9f879 100644 --- a/aws/internal/keyvaluetags/generators/servicetags/main.go +++ b/aws/internal/keyvaluetags/generators/servicetags/main.go @@ -40,7 +40,6 @@ var sliceServiceNames = []string{ "devicefarm", "directconnect", "directoryservice", - "dlm", "docdb", "dynamodb", "ec2", @@ -103,6 +102,7 @@ var mapServiceNames = []string{ "codecommit", "cognitoidentity", "cognitoidentityprovider", + "dlm", "eks", "glacier", "glue", diff --git a/aws/internal/keyvaluetags/generators/updatetags/main.go b/aws/internal/keyvaluetags/generators/updatetags/main.go index 9e8cef5c391..9319cf820f3 100644 --- a/aws/internal/keyvaluetags/generators/updatetags/main.go +++ b/aws/internal/keyvaluetags/generators/updatetags/main.go @@ -44,6 +44,7 @@ var serviceNames = []string{ "devicefarm", "directconnect", "directoryservice", + "dlm", "docdb", "dynamodb", "ec2", @@ -84,6 +85,7 @@ var serviceNames = []string{ "redshift", "resourcegroups", "route53resolver", + "sagemaker", "secretsmanager", "securityhub", "sfn", diff --git a/aws/internal/keyvaluetags/key_value_tags.go b/aws/internal/keyvaluetags/key_value_tags.go index 63e9ad5fc1d..1e4e5be9310 100644 --- a/aws/internal/keyvaluetags/key_value_tags.go +++ b/aws/internal/keyvaluetags/key_value_tags.go @@ -1,5 +1,5 @@ -//go:generate go run generators/listtags/main.go //go:generate go run generators/servicetags/main.go +//go:generate go run generators/listtags/main.go //go:generate go run generators/updatetags/main.go package keyvaluetags diff --git a/aws/internal/keyvaluetags/list_tags_gen.go b/aws/internal/keyvaluetags/list_tags_gen.go index 71899c8a4f7..387284b4d8e 100644 --- a/aws/internal/keyvaluetags/list_tags_gen.go +++ b/aws/internal/keyvaluetags/list_tags_gen.go @@ -27,6 +27,7 @@ import ( "github.com/aws/aws-sdk-go/service/dax" "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ecr" @@ -468,6 +469,23 @@ func DirectoryserviceListTags(conn *directoryservice.DirectoryService, identifie return DirectoryserviceKeyValueTags(output.Tags), nil } +// DlmListTags lists dlm service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func DlmListTags(conn *dlm.DLM, identifier string) (KeyValueTags, error) { + input := &dlm.ListTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + output, err := conn.ListTagsForResource(input) + + if err != nil { + return New(nil), err + } + + return DlmKeyValueTags(output.Tags), nil +} + // DocdbListTags lists docdb 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 c2851e2a12e..8321bab3b1f 100644 --- a/aws/internal/keyvaluetags/service_generation_customizations.go +++ b/aws/internal/keyvaluetags/service_generation_customizations.go @@ -34,6 +34,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -155,6 +156,8 @@ func ServiceClientType(serviceName string) string { funcType = reflect.TypeOf(directconnect.New) case "directoryservice": funcType = reflect.TypeOf(directoryservice.New) + case "dlm": + funcType = reflect.TypeOf(dlm.New) case "docdb": funcType = reflect.TypeOf(docdb.New) case "dynamodb": diff --git a/aws/internal/keyvaluetags/service_tags_gen.go b/aws/internal/keyvaluetags/service_tags_gen.go index 2a31af4a643..597bc03ce12 100644 --- a/aws/internal/keyvaluetags/service_tags_gen.go +++ b/aws/internal/keyvaluetags/service_tags_gen.go @@ -25,7 +25,6 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" - "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -187,6 +186,16 @@ func CognitoidentityproviderKeyValueTags(tags map[string]*string) KeyValueTags { return New(tags) } +// DlmTags returns dlm service tags. +func (tags KeyValueTags) DlmTags() map[string]*string { + return aws.StringMap(tags.Map()) +} + +// DlmKeyValueTags creates KeyValueTags from dlm service tags. +func DlmKeyValueTags(tags map[string]*string) KeyValueTags { + return New(tags) +} + // EksTags returns eks service tags. func (tags KeyValueTags) EksTags() map[string]*string { return aws.StringMap(tags.Map()) @@ -926,33 +935,6 @@ func DirectoryserviceKeyValueTags(tags []*directoryservice.Tag) KeyValueTags { return New(m) } -// DlmTags returns dlm service tags. -func (tags KeyValueTags) DlmTags() []*dlm.Tag { - result := make([]*dlm.Tag, 0, len(tags)) - - for k, v := range tags.Map() { - tag := &dlm.Tag{ - Key: aws.String(k), - Value: aws.String(v), - } - - result = append(result, tag) - } - - return result -} - -// DlmKeyValueTags creates KeyValueTags from dlm service tags. -func DlmKeyValueTags(tags []*dlm.Tag) KeyValueTags { - m := make(map[string]*string, len(tags)) - - for _, tag := range tags { - m[aws.StringValue(tag.Key)] = tag.Value - } - - return New(m) -} - // DocdbTags returns docdb service tags. func (tags KeyValueTags) DocdbTags() []*docdb.Tag { result := make([]*docdb.Tag, 0, len(tags)) diff --git a/aws/internal/keyvaluetags/update_tags_gen.go b/aws/internal/keyvaluetags/update_tags_gen.go index 676e748edde..e9c15867acf 100644 --- a/aws/internal/keyvaluetags/update_tags_gen.go +++ b/aws/internal/keyvaluetags/update_tags_gen.go @@ -33,6 +33,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -73,6 +74,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/route53resolver" + "github.com/aws/aws-sdk-go/service/sagemaker" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/securityhub" "github.com/aws/aws-sdk-go/service/sfn" @@ -1059,6 +1061,42 @@ func DirectoryserviceUpdateTags(conn *directoryservice.DirectoryService, identif return nil } +// DlmUpdateTags updates dlm service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func DlmUpdateTags(conn *dlm.DLM, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { + oldTags := New(oldTagsMap) + newTags := New(newTagsMap) + + if removedTags := oldTags.Removed(newTags); len(removedTags) > 0 { + input := &dlm.UntagResourceInput{ + ResourceArn: aws.String(identifier), + TagKeys: aws.StringSlice(removedTags.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 := &dlm.TagResourceInput{ + ResourceArn: aws.String(identifier), + Tags: updatedTags.IgnoreAws().DlmTags(), + } + + _, err := conn.TagResource(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } + + return nil +} + // DocdbUpdateTags updates docdb service tags. // The identifier is typically the Amazon Resource Name (ARN), although // it may also be a different identifier depending on the service. @@ -2499,6 +2537,42 @@ func Route53resolverUpdateTags(conn *route53resolver.Route53Resolver, identifier return nil } +// SagemakerUpdateTags updates sagemaker service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func SagemakerUpdateTags(conn *sagemaker.SageMaker, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { + oldTags := New(oldTagsMap) + newTags := New(newTagsMap) + + if removedTags := oldTags.Removed(newTags); len(removedTags) > 0 { + input := &sagemaker.DeleteTagsInput{ + ResourceArn: aws.String(identifier), + TagKeys: aws.StringSlice(removedTags.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 := &sagemaker.AddTagsInput{ + ResourceArn: aws.String(identifier), + Tags: updatedTags.IgnoreAws().SagemakerTags(), + } + + _, err := conn.AddTags(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } + + return nil +} + // SecretsmanagerUpdateTags updates secretsmanager 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/provider.go b/aws/provider.go index ae88e3aee4a..accff62cdb8 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -990,6 +990,7 @@ func init() { "glacier", "globalaccelerator", "glue", + "greengrass", "guardduty", "iam", "inspector", diff --git a/aws/resource_aws_api_gateway_deployment_test.go b/aws/resource_aws_api_gateway_deployment_test.go index 058997c2964..5e5789b2a6c 100644 --- a/aws/resource_aws_api_gateway_deployment_test.go +++ b/aws/resource_aws_api_gateway_deployment_test.go @@ -41,6 +41,31 @@ func TestAccAWSAPIGatewayDeployment_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayDeployment_disappears_RestApi(t *testing.T) { + var deployment apigateway.Deployment + var restApi apigateway.RestApi + resourceName := "aws_api_gateway_deployment.test" + restApiResourceName := "aws_api_gateway_rest_api.test" + rName := acctest.RandomWithPrefix("tf-acc-test-deployment") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayDeploymentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayDeploymentConfigStageName(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayDeploymentExists(resourceName, &deployment), + testAccCheckAWSAPIGatewayRestAPIExists(restApiResourceName, &restApi), + testAccCheckAWSAPIGatewayRestAPIDisappears(&restApi), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func TestAccAWSAPIGatewayDeployment_createBeforeDestoryUpdate(t *testing.T) { var deployment apigateway.Deployment var stage apigateway.Stage diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 649f04d84cc..d576edf765c 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -121,6 +121,27 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayRestApi_disappears(t *testing.T) { + var restApi apigateway.RestApi + resourceName := "aws_api_gateway_rest_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayRestAPIConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayRestAPIExists(resourceName, &restApi), + testAccCheckAWSAPIGatewayRestAPIDisappears(&restApi), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func TestAccAWSAPIGatewayRestApi_EndpointConfiguration(t *testing.T) { var restApi apigateway.RestApi rName := acctest.RandomWithPrefix("tf-acc-test") @@ -488,6 +509,20 @@ func testAccCheckAWSAPIGatewayRestAPIDestroy(s *terraform.State) error { return nil } +func testAccCheckAWSAPIGatewayRestAPIDisappears(restApi *apigateway.RestApi) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigateway + + input := &apigateway.DeleteRestApiInput{ + RestApiId: restApi.Id, + } + + _, err := conn.DeleteRestApi(input) + + return err + } +} + const testAccAWSAPIGatewayRestAPIConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "bar" diff --git a/aws/resource_aws_appautoscaling_policy_test.go b/aws/resource_aws_appautoscaling_policy_test.go index f5145827a88..4a8397d07fa 100644 --- a/aws/resource_aws_appautoscaling_policy_test.go +++ b/aws/resource_aws_appautoscaling_policy_test.go @@ -5,6 +5,7 @@ import ( "reflect" "strings" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/applicationautoscaling" @@ -203,6 +204,7 @@ func TestAccAWSAppautoScalingPolicy_spotFleetRequest(t *testing.T) { var policy applicationautoscaling.ScalingPolicy randPolicyName := fmt.Sprintf("test-appautoscaling-policy-%s", acctest.RandString(5)) + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -210,7 +212,7 @@ func TestAccAWSAppautoScalingPolicy_spotFleetRequest(t *testing.T) { CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSAppautoscalingPolicySpotFleetRequestConfig(randPolicyName), + Config: testAccAWSAppautoscalingPolicySpotFleetRequestConfig(randPolicyName, validUntil), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAppautoscalingPolicyExists("aws_appautoscaling_policy.test", &policy), resource.TestCheckResourceAttr("aws_appautoscaling_policy.test", "name", randPolicyName), @@ -497,8 +499,7 @@ resource "aws_appautoscaling_policy" "test" { `, rName) } -func testAccAWSAppautoscalingPolicySpotFleetRequestConfig( - randPolicyName string) string { +func testAccAWSAppautoscalingPolicySpotFleetRequestConfig(randPolicyName, validUntil string) string { return fmt.Sprintf(` data "aws_ami" "amzn-ami-minimal-hvm-ebs" { most_recent = true @@ -546,7 +547,7 @@ resource "aws_spot_fleet_request" "test" { iam_fleet_role = "${aws_iam_role.fleet_role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[2]q terminate_instances_with_expiration = true launch_specification { @@ -580,7 +581,7 @@ resource "aws_appautoscaling_policy" "test" { } } } -`, randPolicyName) +`, randPolicyName, validUntil) } func testAccAWSAppautoscalingPolicyDynamoDB( diff --git a/aws/resource_aws_appautoscaling_scheduled_action_test.go b/aws/resource_aws_appautoscaling_scheduled_action_test.go index 293313d9385..39ccc6966a5 100644 --- a/aws/resource_aws_appautoscaling_scheduled_action_test.go +++ b/aws/resource_aws_appautoscaling_scheduled_action_test.go @@ -65,13 +65,15 @@ func TestAccAWSAppautoscalingScheduledAction_EMR(t *testing.T) { func TestAccAWSAppautoscalingScheduledAction_SpotFleet(t *testing.T) { ts := time.Now().AddDate(0, 0, 1).Format("2006-01-02T15:04:05") + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppautoscalingScheduledActionDestroy, Steps: []resource.TestStep{ { - Config: testAccAppautoscalingScheduledActionConfig_SpotFleet(acctest.RandString(5), ts), + Config: testAccAppautoscalingScheduledActionConfig_SpotFleet(acctest.RandString(5), ts, validUntil), Check: resource.ComposeTestCheckFunc( testAccCheckAwsAppautoscalingScheduledActionExists("aws_appautoscaling_scheduled_action.hoge"), ), @@ -524,7 +526,7 @@ resource "aws_appautoscaling_scheduled_action" "hoge" { `, rName, rName, rName, rName, ts) } -func testAccAppautoscalingScheduledActionConfig_SpotFleet(rName, ts string) string { +func testAccAppautoscalingScheduledActionConfig_SpotFleet(rName, ts, validUntil string) string { return fmt.Sprintf(` data "aws_ami" "amzn-ami-minimal-hvm-ebs" { most_recent = true @@ -572,7 +574,7 @@ resource "aws_spot_fleet_request" "hoge" { iam_fleet_role = "${aws_iam_role.fleet_role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[3]q terminate_instances_with_expiration = true launch_specification { @@ -590,16 +592,16 @@ resource "aws_appautoscaling_target" "hoge" { } resource "aws_appautoscaling_scheduled_action" "hoge" { - name = "tf-appauto-%s" + name = "tf-appauto-%[1]s" service_namespace = "${aws_appautoscaling_target.hoge.service_namespace}" resource_id = "${aws_appautoscaling_target.hoge.resource_id}" scalable_dimension = "${aws_appautoscaling_target.hoge.scalable_dimension}" - schedule = "at(%s)" + schedule = "at(%[2]s)" scalable_target_action { min_capacity = 1 max_capacity = 3 } } -`, rName, ts) +`, rName, ts, validUntil) } diff --git a/aws/resource_aws_appautoscaling_target_test.go b/aws/resource_aws_appautoscaling_target_test.go index d3816e8a556..c6aece57a51 100644 --- a/aws/resource_aws_appautoscaling_target_test.go +++ b/aws/resource_aws_appautoscaling_target_test.go @@ -4,6 +4,7 @@ import ( "fmt" "regexp" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -55,6 +56,7 @@ func TestAccAWSAppautoScalingTarget_basic(t *testing.T) { func TestAccAWSAppautoScalingTarget_spotFleetRequest(t *testing.T) { var target applicationautoscaling.ScalableTarget + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -63,7 +65,7 @@ func TestAccAWSAppautoScalingTarget_spotFleetRequest(t *testing.T) { CheckDestroy: testAccCheckAWSAppautoscalingTargetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSAppautoscalingTargetSpotFleetRequestConfig, + Config: testAccAWSAppautoscalingTargetSpotFleetRequestConfig(validUntil), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAppautoscalingTargetExists("aws_appautoscaling_target.test", &target), resource.TestCheckResourceAttr("aws_appautoscaling_target.test", "service_namespace", "ec2"), @@ -637,7 +639,8 @@ resource "aws_appautoscaling_target" "bar" { `, rInt, rInt, rInt, rInt, rInt, rInt, rInt, rInt) } -var testAccAWSAppautoscalingTargetSpotFleetRequestConfig = fmt.Sprintf(` +func testAccAWSAppautoscalingTargetSpotFleetRequestConfig(validUntil string) string { + return fmt.Sprintf(` data "aws_ami" "amzn-ami-minimal-hvm-ebs" { most_recent = true owners = ["amazon"] @@ -684,7 +687,7 @@ resource "aws_spot_fleet_request" "test" { iam_fleet_role = "${aws_iam_role.fleet_role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true launch_specification { @@ -700,7 +703,8 @@ resource "aws_appautoscaling_target" "test" { min_capacity = 1 max_capacity = 3 } -`) +`, validUntil) +} func testAccAWSAppautoscalingTarget_multipleTargets(tableName string) string { return fmt.Sprintf(` diff --git a/aws/resource_aws_datapipeline_pipeline.go b/aws/resource_aws_datapipeline_pipeline.go index d0c28bbb5fc..193c92d8d62 100644 --- a/aws/resource_aws_datapipeline_pipeline.go +++ b/aws/resource_aws_datapipeline_pipeline.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/datapipeline" "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" ) func resourceAwsDataPipelinePipeline() *schema.Resource { @@ -47,7 +48,7 @@ func resourceAwsDataPipelinePipelineCreate(d *schema.ResourceData, meta interfac input := datapipeline.CreatePipelineInput{ Name: aws.String(d.Get("name").(string)), UniqueId: aws.String(uniqueID), - Tags: tagsFromMapDataPipeline(d.Get("tags").(map[string]interface{})), + Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().DatapipelineTags(), } if v, ok := d.GetOk("description"); ok { @@ -80,23 +81,22 @@ func resourceAwsDataPipelinePipelineRead(d *schema.ResourceData, meta interface{ d.Set("name", v.Name) d.Set("description", v.Description) - if err := d.Set("tags", tagsToMapDataPipeline(v.Tags)); err != nil { + if err := d.Set("tags", keyvaluetags.DatapipelineKeyValueTags(v.Tags).IgnoreAws().Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } + return nil } func resourceAwsDataPipelinePipelineUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datapipelineconn - if err := setTagsDataPipeline(conn, d); err != nil { - if isAWSErr(err, datapipeline.ErrCodePipelineNotFoundException, "") || isAWSErr(err, datapipeline.ErrCodePipelineDeletedException, "") { - log.Printf("[WARN] DataPipeline (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } + if d.HasChange("tags") { + o, n := d.GetChange("tags") - return fmt.Errorf("Error updating tags: %s", err) + if err := keyvaluetags.DatapipelineUpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating Datapipeline Pipeline (%s) tags: %s", d.Id(), err) + } } return resourceAwsDataPipelinePipelineRead(d, meta) diff --git a/aws/resource_aws_dlm_lifecycle_policy.go b/aws/resource_aws_dlm_lifecycle_policy.go index 0dbfd6cf052..8b4f1e305bd 100644 --- a/aws/resource_aws_dlm_lifecycle_policy.go +++ b/aws/resource_aws_dlm_lifecycle_policy.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/dlm" "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 resourceAwsDlmLifecyclePolicy() *schema.Resource { @@ -22,6 +23,10 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "description": { Type: schema.TypeString, Required: true, @@ -130,6 +135,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { dlm.SettablePolicyStateValuesEnabled, }, false), }, + "tags": tagsSchema(), }, } } @@ -144,6 +150,10 @@ func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{ State: aws.String(d.Get("state").(string)), } + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + input.Tags = keyvaluetags.New(v).IgnoreAws().DlmTags() + } + log.Printf("[INFO] Creating DLM lifecycle policy: %s", input) out, err := conn.CreateLifecyclePolicy(&input) if err != nil { @@ -173,6 +183,7 @@ func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error reading DLM Lifecycle Policy (%s): %s", d.Id(), err) } + d.Set("arn", out.Policy.PolicyArn) d.Set("description", out.Policy.Description) d.Set("execution_role_arn", out.Policy.ExecutionRoleArn) d.Set("state", out.Policy.State) @@ -180,6 +191,10 @@ 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 { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } @@ -189,24 +204,38 @@ func resourceAwsDlmLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{ input := dlm.UpdateLifecyclePolicyInput{ PolicyId: aws.String(d.Id()), } + updateLifecyclePolicy := false if d.HasChange("description") { input.Description = aws.String(d.Get("description").(string)) + updateLifecyclePolicy = true } if d.HasChange("execution_role_arn") { input.ExecutionRoleArn = aws.String(d.Get("execution_role_arn").(string)) + updateLifecyclePolicy = true } if d.HasChange("state") { input.State = aws.String(d.Get("state").(string)) + updateLifecyclePolicy = true } if d.HasChange("policy_details") { input.PolicyDetails = expandDlmPolicyDetails(d.Get("policy_details").([]interface{})) + updateLifecyclePolicy = true } - log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) - _, err := conn.UpdateLifecyclePolicy(&input) - if err != nil { - return fmt.Errorf("error updating DLM Lifecycle Policy (%s): %s", d.Id(), err) + if updateLifecyclePolicy { + log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) + _, err := conn.UpdateLifecyclePolicy(&input) + if err != nil { + return fmt.Errorf("error updating DLM Lifecycle Policy (%s): %s", d.Id(), err) + } + } + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.DlmUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } } return resourceAwsDlmLifecyclePolicyRead(d, meta) diff --git a/aws/resource_aws_dlm_lifecycle_policy_test.go b/aws/resource_aws_dlm_lifecycle_policy_test.go index a859a14a454..10b84f5be56 100644 --- a/aws/resource_aws_dlm_lifecycle_policy_test.go +++ b/aws/resource_aws_dlm_lifecycle_policy_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -24,6 +25,7 @@ func TestAccAWSDlmLifecyclePolicy_Basic(t *testing.T) { Config: dlmLifecyclePolicyBasicConfig(rName), Check: resource.ComposeTestCheckFunc( checkDlmLifecyclePolicyExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "dlm", regexp.MustCompile(`policy/.+`)), resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-basic"), resource.TestCheckResourceAttrSet(resourceName, "execution_role_arn"), resource.TestCheckResourceAttr(resourceName, "state", "ENABLED"), @@ -34,6 +36,7 @@ func TestAccAWSDlmLifecyclePolicy_Basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "policy_details.0.schedule.0.create_rule.0.times.0"), resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.retain_rule.0.count", "10"), resource.TestCheckResourceAttr(resourceName, "policy_details.0.target_tags.tf-acc-test", "basic"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -94,6 +97,49 @@ func TestAccAWSDlmLifecyclePolicy_Full(t *testing.T) { }) } +func TestAccAWSDlmLifecyclePolicy_Tags(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_dlm_lifecycle_policy.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSDlm(t) }, + Providers: testAccProviders, + CheckDestroy: dlmLifecyclePolicyDestroy, + Steps: []resource.TestStep{ + { + Config: dlmLifecyclePolicyConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: dlmLifecyclePolicyConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: dlmLifecyclePolicyConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + func dlmLifecyclePolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).dlmconn @@ -327,3 +373,110 @@ resource "aws_dlm_lifecycle_policy" "full" { } `, rName) } + +func dlmLifecyclePolicyConfigTags1(rName, tagKey1, tagValue1 string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "test" { + name = %[1]q + + assume_role_policy = < 0 { + if err := keyvaluetags.Ec2UpdateTags(ec2conn, d.Id(), nil, v); err != nil { + return fmt.Errorf("error adding tags: %s", err) } } @@ -272,7 +273,9 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { d.SetId(*address.AllocationId) } - d.Set("tags", tagsToMap(address.Tags)) + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(address.Tags).IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } return nil } @@ -355,9 +358,10 @@ func resourceAwsEipUpdate(d *schema.ResourceData, meta interface{}) error { } } - if _, ok := d.GetOk("tags"); ok { - if err := setTags(ec2conn, d); err != nil { - return fmt.Errorf("Error updating EIP tags: %s", err) + if d.HasChange("tags") { + 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_test.go b/aws/resource_aws_eip_test.go index 1dad658e07b..0476d9e5801 100644 --- a/aws/resource_aws_eip_test.go +++ b/aws/resource_aws_eip_test.go @@ -912,6 +912,10 @@ resource "aws_eip" "test" { ` const testAccAWSEIPNetworkInterfaceConfig = ` +data "aws_availability_zones" "available" { + state = "available" +} + resource "aws_vpc" "test" { cidr_block = "10.0.0.0/24" tags = { @@ -925,7 +929,7 @@ resource "aws_internet_gateway" "test" { resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" cidr_block = "10.0.0.0/24" tags = { Name = "tf-acc-eip-network-interface" @@ -946,6 +950,10 @@ resource "aws_eip" "test" { ` const testAccAWSEIPMultiNetworkInterfaceConfig = ` +data "aws_availability_zones" "available" { + state = "available" +} + resource "aws_vpc" "test" { cidr_block = "10.0.0.0/24" tags = { @@ -959,7 +967,7 @@ resource "aws_internet_gateway" "test" { resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" cidr_block = "10.0.0.0/24" tags = { Name = "tf-acc-eip-multi-network-interface" @@ -1011,6 +1019,10 @@ data "aws_ami" "amzn-ami-minimal-pv" { } } +data "aws_availability_zones" "available" { + state = "available" +} + resource "aws_eip" "test" { count = "${var.server_count}" instance = "${element(aws_instance.example.*.id, count.index)}" @@ -1023,8 +1035,8 @@ resource "aws_instance" "example" { ami = "${data.aws_ami.amzn-ami-minimal-pv.id}" instance_type = "m1.small" associate_public_ip_address = true - subnet_id = "${aws_subnet.us-east-1b-public.id}" - availability_zone = "${aws_subnet.us-east-1b-public.availability_zone}" + subnet_id = "${aws_subnet.us-east-1-0-public.id}" + availability_zone = "${aws_subnet.us-east-1-0-public.availability_zone}" tags = { Name = "testAccAWSEIP_classic_disassociate" @@ -1046,11 +1058,11 @@ resource "aws_internet_gateway" "example" { vpc_id = "${aws_vpc.example.id}" } -resource "aws_subnet" "us-east-1b-public" { +resource "aws_subnet" "us-east-1-0-public" { vpc_id = "${aws_vpc.example.id}" cidr_block = "10.0.0.0/24" - availability_zone = "us-east-1b" + availability_zone = "${data.aws_availability_zones.available.names[0]}" tags = { Name = "tf-acc-eip-classic-disassociate" } @@ -1065,8 +1077,8 @@ resource "aws_route_table" "us-east-1-public" { } } -resource "aws_route_table_association" "us-east-1b-public" { - subnet_id = "${aws_subnet.us-east-1b-public.id}" +resource "aws_route_table_association" "us-east-1-0-public" { + subnet_id = "${aws_subnet.us-east-1-0-public.id}" route_table_id = "${aws_route_table.us-east-1-public.id}" } `, rootDeviceType) diff --git a/aws/resource_aws_glue_crawler.go b/aws/resource_aws_glue_crawler.go index 50b88936c95..8d7e16adc25 100644 --- a/aws/resource_aws_glue_crawler.go +++ b/aws/resource_aws_glue_crawler.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "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" ) func resourceAwsGlueCrawler() *schema.Resource { @@ -191,6 +192,7 @@ func resourceAwsGlueCrawler() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "tags": tagsSchema(), }, } } @@ -239,6 +241,7 @@ func createCrawlerInput(crawlerName string, d *schema.ResourceData) (*glue.Creat Name: aws.String(crawlerName), DatabaseName: aws.String(d.Get("database_name").(string)), Role: aws.String(d.Get("role").(string)), + Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().GlueTags(), Targets: crawlerTargets, } if description, ok := d.GetOk("description"); ok { @@ -455,29 +458,49 @@ func resourceAwsGlueCrawlerUpdate(d *schema.ResourceData, meta interface{}) erro glueConn := meta.(*AWSClient).glueconn name := d.Get("name").(string) - updateCrawlerInput, err := updateCrawlerInput(name, d) - if err != nil { - return err - } - - // Retry for IAM eventual consistency - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err := glueConn.UpdateCrawler(updateCrawlerInput) + if d.HasChange("catalog_target") || + d.HasChange("classifiers") || + d.HasChange("configuration") || + d.HasChange("description") || + d.HasChange("dynamodb_target") || + d.HasChange("jdbc_target") || + d.HasChange("role") || + d.HasChange("s3_target") || + d.HasChange("schedule") || + d.HasChange("schema_change_policy") || + d.HasChange("security_configuration") || + d.HasChange("table_prefix") { + updateCrawlerInput, err := updateCrawlerInput(name, d) if err != nil { - if isAWSErr(err, glue.ErrCodeInvalidInputException, "Service is unable to assume role") { - return resource.RetryableError(err) - } - // InvalidInputException: Unable to retrieve connection tf-acc-test-8656357591012534997: User: arn:aws:sts::*******:assumed-role/tf-acc-test-8656357591012534997/AWS-Crawler is not authorized to perform: glue:GetConnection on resource: * (Service: AmazonDataCatalog; Status Code: 400; Error Code: AccessDeniedException; Request ID: 4d72b66f-9c75-11e8-9faf-5b526c7be968) - if isAWSErr(err, glue.ErrCodeInvalidInputException, "is not authorized") { - return resource.RetryableError(err) + return err + } + + // Retry for IAM eventual consistency + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := glueConn.UpdateCrawler(updateCrawlerInput) + if err != nil { + if isAWSErr(err, glue.ErrCodeInvalidInputException, "Service is unable to assume role") { + return resource.RetryableError(err) + } + // InvalidInputException: Unable to retrieve connection tf-acc-test-8656357591012534997: User: arn:aws:sts::*******:assumed-role/tf-acc-test-8656357591012534997/AWS-Crawler is not authorized to perform: glue:GetConnection on resource: * (Service: AmazonDataCatalog; Status Code: 400; Error Code: AccessDeniedException; Request ID: 4d72b66f-9c75-11e8-9faf-5b526c7be968) + if isAWSErr(err, glue.ErrCodeInvalidInputException, "is not authorized") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } - return resource.NonRetryableError(err) + return nil + }) + + if err != nil { + return fmt.Errorf("error updating Glue crawler: %s", err) } - return nil - }) + } - if err != nil { - return fmt.Errorf("error updating Glue crawler: %s", err) + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.GlueUpdateTags(glueConn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } } return resourceAwsGlueCrawlerRead(d, meta) @@ -559,6 +582,16 @@ func resourceAwsGlueCrawlerRead(d *schema.ResourceData, meta interface{}) error } } + tags, err := keyvaluetags.GlueListTags(glueConn, crawlerARN) + + if err != nil { + return fmt.Errorf("error listing tags for Glue Crawler (%s): %s", crawlerARN, err) + } + + if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } diff --git a/aws/resource_aws_glue_crawler_test.go b/aws/resource_aws_glue_crawler_test.go index 9bb676e30f5..8d509e87d72 100644 --- a/aws/resource_aws_glue_crawler_test.go +++ b/aws/resource_aws_glue_crawler_test.go @@ -89,6 +89,7 @@ func TestAccAWSGlueCrawler_DynamodbTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -111,6 +112,7 @@ func TestAccAWSGlueCrawler_DynamodbTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -154,6 +156,7 @@ func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -178,6 +181,7 @@ func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -318,6 +322,7 @@ func TestAccAWSGlueCrawler_S3Target(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -341,6 +346,7 @@ func TestAccAWSGlueCrawler_S3Target(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -477,6 +483,7 @@ func TestAccAWSGlueCrawler_CatalogTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "LOG"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestCheckResourceAttr(resourceName, "configuration", "{\"Version\":1.0,\"Grouping\":{\"TableGroupingPolicy\":\"CombineCompatibleSchemas\"}}"), ), }, @@ -503,6 +510,7 @@ func TestAccAWSGlueCrawler_CatalogTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "LOG"), resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestCheckResourceAttr(resourceName, "configuration", "{\"Version\":1.0,\"Grouping\":{\"TableGroupingPolicy\":\"CombineCompatibleSchemas\"}}"), ), }, @@ -900,6 +908,50 @@ func TestAccAWSGlueCrawler_TablePrefix(t *testing.T) { }) } +func TestAccAWSGlueCrawler_Tags(t *testing.T) { + var crawler1, crawler2, crawler3 glue.Crawler + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_glue_crawler.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCrawlerConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccGlueCrawlerConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler2), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccGlueCrawlerConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler3), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + func TestAccAWSGlueCrawler_SecurityConfiguration(t *testing.T) { var crawler glue.Crawler rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1690,6 +1742,57 @@ resource "aws_glue_crawler" "test" { `, rName, rName, tablePrefix) } +func testAccGlueCrawlerConfigTags1(rName, tagKey1, tagValue1 string) string { + return testAccGlueCrawlerConfig_Base(rName) + fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = %[1]q +} + +resource "aws_glue_crawler" "test" { + depends_on = ["aws_iam_role_policy_attachment.test-AWSGlueServiceRole"] + + database_name = "${aws_glue_catalog_database.test.name}" + name = %[1]q + role = "${aws_iam_role.test.name}" + table_prefix = %[1]q + + s3_target { + path = "s3://bucket-name" + } + + tags = { + %[2]q = %[3]q + } +} +`, rName, tagKey1, tagValue1) +} + +func testAccGlueCrawlerConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccGlueCrawlerConfig_Base(rName) + fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = %[1]q +} + +resource "aws_glue_crawler" "test" { + depends_on = ["aws_iam_role_policy_attachment.test-AWSGlueServiceRole"] + + database_name = "${aws_glue_catalog_database.test.name}" + name = %[1]q + role = "${aws_iam_role.test.name}" + table_prefix = %[1]q + + s3_target { + path = "s3://bucket-name" + } + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) +} + func testAccGlueCrawlerConfig_SecurityConfiguration(rName, securityConfiguration string) string { return testAccGlueCrawlerConfig_Base(rName) + fmt.Sprintf(` resource "aws_glue_catalog_database" "test" { diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 02e8e94a95e..d20facd407f 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -11,6 +11,7 @@ import ( "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" ) func resourceAwsRDSClusterInstance() *schema.Resource { @@ -213,7 +214,6 @@ func resourceAwsRDSClusterInstance() *schema.Resource { func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) createOpts := &rds.CreateDBInstanceInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), @@ -223,7 +223,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - Tags: tags, + Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().RdsTags(), } if attr, ok := d.GetOk("availability_zone"); ok { @@ -396,8 +396,12 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("db_parameter_group_name", db.DBParameterGroups[0].DBParameterGroupName) } - if err := saveTagsRDS(conn, d, aws.StringValue(db.DBInstanceArn)); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Cluster Instance (%s): %s", *db.DBClusterIdentifier, err) + tags, err := keyvaluetags.RdsListTags(conn, aws.StringValue(db.DBInstanceArn)) + 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 { + return fmt.Errorf("error setting tags: %s", err) } return nil @@ -520,8 +524,12 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ } - if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { - return err + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.RdsUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating RDS Cluster Instance (%s) tags: %s", d.Id(), err) + } } return resourceAwsRDSClusterInstanceRead(d, meta) diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index 72a11519317..78356ad8861 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -11,6 +11,7 @@ import ( "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" ) const rdsClusterParameterGroupMaxParamsBulkEdit = 20 @@ -88,7 +89,6 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource { func resourceAwsRDSClusterParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { rdsconn := meta.(*AWSClient).rdsconn - tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) var groupName string if v, ok := d.GetOk("name"); ok { @@ -103,7 +103,7 @@ func resourceAwsRDSClusterParameterGroupCreate(d *schema.ResourceData, meta inte DBClusterParameterGroupName: aws.String(groupName), DBParameterGroupFamily: aws.String(d.Get("family").(string)), Description: aws.String(d.Get("description").(string)), - Tags: tags, + Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().RdsTags(), } log.Printf("[DEBUG] Create DB Cluster Parameter Group: %#v", createOpts) @@ -170,11 +170,9 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) } - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList + if err := d.Set("tags", keyvaluetags.RdsKeyValueTags(resp.TagList).IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } - d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -228,9 +226,12 @@ func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta inte } } - if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { - return err - } else { + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + 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") } diff --git a/aws/resource_aws_route53_resolver_endpoint.go b/aws/resource_aws_route53_resolver_endpoint.go index 1f29f353876..0cd4b6f8504 100644 --- a/aws/resource_aws_route53_resolver_endpoint.go +++ b/aws/resource_aws_route53_resolver_endpoint.go @@ -12,6 +12,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/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) const ( @@ -115,7 +116,7 @@ func resourceAwsRoute53ResolverEndpointCreate(d *schema.ResourceData, meta inter req.Name = aws.String(v.(string)) } if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { - req.Tags = tagsFromMapRoute53Resolver(v.(map[string]interface{})) + req.Tags = keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().Route53resolverTags() } log.Printf("[DEBUG] Creating Route53 Resolver endpoint: %#v", req) @@ -179,8 +180,14 @@ func resourceAwsRoute53ResolverEndpointRead(d *schema.ResourceData, meta interfa return err } - if err := getTagsRoute53Resolver(conn, d); err != nil { - return fmt.Errorf("error getting Route53 Resolver endpoint (%s) tags: %s", d.Id(), err) + tags, err := keyvaluetags.Route53resolverListTags(conn, d.Get("arn").(string)) + + if err != nil { + 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 { + return fmt.Errorf("error setting tags: %s", err) } return nil @@ -257,10 +264,13 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter d.SetPartial("ip_address") } - if err := setTagsRoute53Resolver(conn, d); err != nil { - return fmt.Errorf("error setting Route53 Resolver endpoint (%s) tags: %s", d.Id(), err) + if d.HasChange("tags") { + o, n := d.GetChange("tags") + 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.SetPartial("tags") d.Partial(false) return resourceAwsRoute53ResolverEndpointRead(d, meta) diff --git a/aws/resource_aws_route53_resolver_rule.go b/aws/resource_aws_route53_resolver_rule.go index 6f781cb168a..937951bea5d 100644 --- a/aws/resource_aws_route53_resolver_rule.go +++ b/aws/resource_aws_route53_resolver_rule.go @@ -3,6 +3,7 @@ package aws import ( "bytes" "fmt" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" "log" "time" @@ -126,7 +127,7 @@ func resourceAwsRoute53ResolverRuleCreate(d *schema.ResourceData, meta interface req.TargetIps = expandRoute53ResolverRuleTargetIps(v.(*schema.Set)) } if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { - req.Tags = tagsFromMapRoute53Resolver(v.(map[string]interface{})) + req.Tags = keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().Route53resolverTags() } log.Printf("[DEBUG] Creating Route 53 Resolver rule: %s", req) @@ -172,9 +173,14 @@ func resourceAwsRoute53ResolverRuleRead(d *schema.ResourceData, meta interface{} return err } - err = getTagsRoute53Resolver(conn, d) + tags, err := keyvaluetags.Route53resolverListTags(conn, d.Get("arn").(string)) + if err != nil { - return fmt.Errorf("Error reading Route 53 Resolver rule tags %s: %s", d.Id(), err) + 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 { + return fmt.Errorf("error setting tags: %s", err) } return nil @@ -217,10 +223,13 @@ func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface d.SetPartial("target_ip") } - if err := setTagsRoute53Resolver(conn, d); err != nil { - return fmt.Errorf("error setting Route53 Resolver rule (%s) tags: %s", d.Id(), err) + if d.HasChange("tags") { + o, n := d.GetChange("tags") + 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.SetPartial("tags") d.Partial(false) return resourceAwsRoute53ResolverRuleRead(d, meta) diff --git a/aws/resource_aws_sagemaker_endpoint.go b/aws/resource_aws_sagemaker_endpoint.go index 422845dfcb5..b48c215a47b 100644 --- a/aws/resource_aws_sagemaker_endpoint.go +++ b/aws/resource_aws_sagemaker_endpoint.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/sagemaker" "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" ) func resourceAwsSagemakerEndpoint() *schema.Resource { @@ -61,7 +62,7 @@ func resourceAwsSagemakerEndpointCreate(d *schema.ResourceData, meta interface{} } if v, ok := d.GetOk("tags"); ok { - createOpts.Tags = tagsFromMapSagemaker(v.(map[string]interface{})) + createOpts.Tags = keyvaluetags.New(v.(map[string]interface{})).IgnoreAws().SagemakerTags() } log.Printf("[DEBUG] SageMaker Endpoint create config: %#v", *createOpts) @@ -116,15 +117,13 @@ func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{}) return err } - tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: endpoint.EndpointArn, - }) + tags, err := keyvaluetags.SagemakerListTags(conn, aws.StringValue(endpoint.EndpointArn)) if err != nil { - return fmt.Errorf("error listing tags for SageMaker Endpoint (%s): %s", d.Id(), err) + return fmt.Errorf("error listing tags for Sagemaker Endpoint (%s): %s", d.Id(), err) } - if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { - return err + if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } return nil @@ -135,8 +134,12 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{} d.Partial(true) - if err := setSagemakerTags(conn, d); err != nil { - return err + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating Sagemaker Endpoint (%s) tags: %s", d.Id(), err) + } } d.SetPartial("tags") diff --git a/aws/resource_aws_sagemaker_endpoint_configuration.go b/aws/resource_aws_sagemaker_endpoint_configuration.go index 841674eed7e..45ae503dd21 100644 --- a/aws/resource_aws_sagemaker_endpoint_configuration.go +++ b/aws/resource_aws_sagemaker_endpoint_configuration.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/sagemaker" "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" ) func resourceAwsSagemakerEndpointConfiguration() *schema.Resource { @@ -116,7 +117,7 @@ func resourceAwsSagemakerEndpointConfigurationCreate(d *schema.ResourceData, met } if v, ok := d.GetOk("tags"); ok { - createOpts.Tags = tagsFromMapSagemaker(v.(map[string]interface{})) + createOpts.Tags = keyvaluetags.New(v.(map[string]interface{})).IgnoreAws().SagemakerTags() } log.Printf("[DEBUG] SageMaker Endpoint Configuration create config: %#v", *createOpts) @@ -159,23 +160,27 @@ func resourceAwsSagemakerEndpointConfigurationRead(d *schema.ResourceData, meta return err } - tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: endpointConfig.EndpointConfigArn, - }) + tags, err := keyvaluetags.SagemakerListTags(conn, aws.StringValue(endpointConfig.EndpointConfigArn)) if err != nil { - return fmt.Errorf("error listing tags of SageMaker Endpoint Configuration %s: %s", d.Id(), err) + return fmt.Errorf("error listing tags for Sagemaker Endpoint Configuration (%s): %s", d.Id(), err) } - if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { - return err + + if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } + return nil } func resourceAwsSagemakerEndpointConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn - if err := setSagemakerTags(conn, d); err != nil { - return err + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating Sagemaker Endpoint Configuration (%s) tags: %s", d.Id(), err) + } } return resourceAwsSagemakerEndpointConfigurationRead(d, meta) } diff --git a/aws/resource_aws_sagemaker_model.go b/aws/resource_aws_sagemaker_model.go index 8e40ae18903..ba977fa3aa2 100644 --- a/aws/resource_aws_sagemaker_model.go +++ b/aws/resource_aws_sagemaker_model.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/sagemaker" "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" ) func resourceAwsSagemakerModel() *schema.Resource { @@ -164,30 +165,27 @@ func resourceAwsSagemakerModelCreate(d *schema.ResourceData, meta interface{}) e } if v, ok := d.GetOk("primary_container"); ok { - m := v.([]interface{})[0].(map[string]interface{}) - createOpts.PrimaryContainer = expandContainer(m) + createOpts.PrimaryContainer = expandContainer(v.([]interface{})[0].(map[string]interface{})) } if v, ok := d.GetOk("container"); ok { - containers := expandContainers(v.([]interface{})) - createOpts.SetContainers(containers) + createOpts.Containers = expandContainers(v.([]interface{})) } if v, ok := d.GetOk("execution_role_arn"); ok { - createOpts.SetExecutionRoleArn(v.(string)) + createOpts.ExecutionRoleArn = aws.String(v.(string)) } if v, ok := d.GetOk("tags"); ok { - createOpts.SetTags(tagsFromMapSagemaker(v.(map[string]interface{}))) + createOpts.Tags = keyvaluetags.New(v.(map[string]interface{})).IgnoreAws().SagemakerTags() } if v, ok := d.GetOk("vpc_config"); ok { - vpcConfig := expandSageMakerVpcConfigRequest(v.([]interface{})) - createOpts.SetVpcConfig(vpcConfig) + createOpts.VpcConfig = expandSageMakerVpcConfigRequest(v.([]interface{})) } if v, ok := d.GetOk("enable_network_isolation"); ok { - createOpts.SetEnableNetworkIsolation(v.(bool)) + createOpts.EnableNetworkIsolation = aws.Bool(v.(bool)) } log.Printf("[DEBUG] Sagemaker model create config: %#v", *createOpts) @@ -255,16 +253,15 @@ func resourceAwsSagemakerModelRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("error setting vpc_config: %s", err) } - tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: model.ModelArn, - }) + tags, err := keyvaluetags.SagemakerListTags(conn, aws.StringValue(model.ModelArn)) if err != nil { - return fmt.Errorf("error listing tags of Sagemaker model %s: %s", d.Id(), err) + return fmt.Errorf("error listing tags for Sagemaker Model (%s): %s", d.Id(), err) } - if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { - return err + if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } + return nil } @@ -286,10 +283,12 @@ func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) e d.Partial(true) - if err := setSagemakerTags(conn, d); err != nil { - return err - } else { - d.SetPartial("tags") + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating Sagemaker Model (%s) tags: %s", d.Id(), err) + } } d.Partial(false) diff --git a/aws/resource_aws_sagemaker_notebook_instance.go b/aws/resource_aws_sagemaker_notebook_instance.go index 603bb8f5483..8f6e46fb88e 100644 --- a/aws/resource_aws_sagemaker_notebook_instance.go +++ b/aws/resource_aws_sagemaker_notebook_instance.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/sagemaker" "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" ) func resourceAwsSagemakerNotebookInstance() *schema.Resource { @@ -102,8 +103,7 @@ func resourceAwsSagemakerNotebookInstanceCreate(d *schema.ResourceData, meta int } if v, ok := d.GetOk("tags"); ok { - tagsIn := v.(map[string]interface{}) - createOpts.Tags = tagsFromMapSagemaker(tagsIn) + createOpts.Tags = keyvaluetags.New(v.(map[string]interface{})).IgnoreAws().SagemakerTags() } log.Printf("[DEBUG] sagemaker notebook instance create config: %#v", *createOpts) @@ -177,16 +177,16 @@ func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta inter if err := d.Set("arn", notebookInstance.NotebookInstanceArn); err != nil { return fmt.Errorf("error setting arn for sagemaker notebook instance (%s): %s", d.Id(), err) } - tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: notebookInstance.NotebookInstanceArn, - }) + + tags, err := keyvaluetags.SagemakerListTags(conn, aws.StringValue(notebookInstance.NotebookInstanceArn)) if err != nil { - return fmt.Errorf("error listing tags for sagemaker notebook instance (%s): %s", d.Id(), err) + return fmt.Errorf("error listing tags for Sagemaker Notebook Instance (%s): %s", d.Id(), err) } - if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { - return fmt.Errorf("error setting tags for notebook instance (%s): %s", d.Id(), err) + if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } + return nil } @@ -195,8 +195,12 @@ func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta int d.Partial(true) - if err := setSagemakerTags(conn, d); err != nil { - return err + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating Sagemaker Notebook Instance (%s) tags: %s", d.Id(), err) + } } d.SetPartial("tags") diff --git a/aws/resource_aws_sagemaker_notebook_instance_test.go b/aws/resource_aws_sagemaker_notebook_instance_test.go index ce4b31159a7..4cf9ffae61a 100644 --- a/aws/resource_aws_sagemaker_notebook_instance_test.go +++ b/aws/resource_aws_sagemaker_notebook_instance_test.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/sagemaker" "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" ) const sagemakerTestAccSagemakerNotebookInstanceResourceNamePrefix = "terraform-testacc-" @@ -328,14 +329,12 @@ func testAccCheckAWSSagemakerNotebookInstanceTags(notebook *sagemaker.DescribeNo return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).sagemakerconn - ts, err := conn.ListTags(&sagemaker.ListTagsInput{ - ResourceArn: notebook.NotebookInstanceArn, - }) + tags, err := keyvaluetags.SagemakerListTags(conn, aws.StringValue(notebook.NotebookInstanceArn)) if err != nil { - return fmt.Errorf("Error listing tags: %s", err) + return err } - m := tagsToMapSagemaker(ts.Tags) + m := tags.IgnoreAws().Map() v, ok := m[key] if value != "" && !ok { return fmt.Errorf("Missing tag: %s", key) diff --git a/aws/resource_aws_servicequotas_service_quota.go b/aws/resource_aws_servicequotas_service_quota.go index a83ddcffd72..6452a3ec626 100644 --- a/aws/resource_aws_servicequotas_service_quota.go +++ b/aws/resource_aws_servicequotas_service_quota.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "strings" "github.com/aws/aws-sdk-go/aws" @@ -129,6 +130,12 @@ func resourceAwsServiceQuotasServiceQuotaRead(d *schema.ResourceData, meta inter output, err := conn.GetServiceQuota(input) + if isAWSErr(err, servicequotas.ErrCodeNoSuchResourceException, "") { + log.Printf("[WARN] Service Quotas Service Quota (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { return fmt.Errorf("error getting Service Quotas Service Quota (%s): %s", d.Id(), err) } diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index 3819bc4a557..42366eea3f2 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -60,6 +60,7 @@ func TestAccAWSSpotFleetRequest_basic(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -67,11 +68,12 @@ func TestAccAWSSpotFleetRequest_basic(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + 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), ), }, }, @@ -82,6 +84,7 @@ 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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -89,7 +92,7 @@ func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigAssociatePublicIpAddress(rName, rInt), + 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"), @@ -105,6 +108,7 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -112,7 +116,7 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + 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"), @@ -127,6 +131,7 @@ func TestAccAWSSpotFleetRequest_fleetType(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -134,7 +139,7 @@ func TestAccAWSSpotFleetRequest_fleetType(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigFleetType(rName, rInt), + 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"), @@ -149,6 +154,7 @@ func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -156,7 +162,7 @@ func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -172,6 +178,7 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -179,7 +186,7 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &before), @@ -189,7 +196,7 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { ), }, { - Config: testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &after), @@ -207,6 +214,7 @@ func TestAccAWSSpotFleetRequest_updateTargetCapacity(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -214,7 +222,7 @@ func TestAccAWSSpotFleetRequest_updateTargetCapacity(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + 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"), @@ -222,14 +230,14 @@ func TestAccAWSSpotFleetRequest_updateTargetCapacity(t *testing.T) { ), }, { - Config: testAccAWSSpotFleetRequestConfigTargetCapacity(rName, rInt), + 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"), ), }, { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + 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"), @@ -244,6 +252,7 @@ func TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy(t *testing var before, after ec2.SpotFleetRequestConfig rName := acctest.RandString(10) rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -251,7 +260,7 @@ func TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy(t *testing CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + 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"), @@ -259,7 +268,7 @@ func TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy(t *testing ), }, { - Config: testAccAWSSpotFleetRequestConfigExcessCapacityTermination(rName, rInt), + 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"), @@ -273,6 +282,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -280,7 +290,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfig(rName, rInt), + Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -296,6 +306,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -303,7 +314,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithAzs(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithAzs(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -321,6 +332,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -328,7 +340,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithSubnet(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithSubnet(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -344,6 +356,7 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -351,7 +364,7 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -371,6 +384,7 @@ 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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -378,7 +392,7 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet(t *testing.T) CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameSubnet(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameSubnet(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -394,6 +408,7 @@ func TestAccAWSSpotFleetRequest_overriddingSpotPrice(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -401,7 +416,7 @@ func TestAccAWSSpotFleetRequest_overriddingSpotPrice(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -422,6 +437,7 @@ func TestAccAWSSpotFleetRequest_withoutSpotPrice(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -429,7 +445,7 @@ func TestAccAWSSpotFleetRequest_withoutSpotPrice(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -445,6 +461,7 @@ func TestAccAWSSpotFleetRequest_diversifiedAllocation(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -452,7 +469,7 @@ func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -469,6 +486,7 @@ func TestAccAWSSpotFleetRequest_multipleInstancePools(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -476,7 +494,7 @@ func TestAccAWSSpotFleetRequest_multipleInstancePools(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigMultipleInstancePools(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigMultipleInstancePools(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -494,6 +512,7 @@ func TestAccAWSSpotFleetRequest_withWeightedCapacity(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) fulfillSleep := func() resource.TestCheckFunc { // sleep so that EC2 can fuflill the request. We do this to guard against a @@ -515,7 +534,7 @@ func TestAccAWSSpotFleetRequest_withWeightedCapacity(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( fulfillSleep(), testAccCheckAWSSpotFleetRequestExists( @@ -536,6 +555,7 @@ func TestAccAWSSpotFleetRequest_withEBSDisk(t *testing.T) { var config ec2.SpotFleetRequestConfig rName := acctest.RandString(10) rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -543,7 +563,7 @@ func TestAccAWSSpotFleetRequest_withEBSDisk(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestEBSConfig(rName, rInt), + Config: testAccAWSSpotFleetRequestEBSConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &config), @@ -559,6 +579,7 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId(t *t var config 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{ @@ -567,7 +588,7 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId(t *t CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestLaunchSpecificationEbsBlockDeviceKmsKeyId(rName, rInt), + Config: testAccAWSSpotFleetRequestLaunchSpecificationEbsBlockDeviceKmsKeyId(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists(resourceName, &config), ), @@ -580,6 +601,7 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId(t * var config 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{ @@ -588,7 +610,7 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId(t * CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestLaunchSpecificationRootBlockDeviceKmsKeyId(rName, rInt), + Config: testAccAWSSpotFleetRequestLaunchSpecificationRootBlockDeviceKmsKeyId(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists(resourceName, &config), ), @@ -601,6 +623,7 @@ func TestAccAWSSpotFleetRequest_withTags(t *testing.T) { var config ec2.SpotFleetRequestConfig rName := acctest.RandString(10) rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -608,7 +631,7 @@ func TestAccAWSSpotFleetRequest_withTags(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestTagsConfig(rName, rInt), + 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"), @@ -624,6 +647,7 @@ func TestAccAWSSpotFleetRequest_placementTenancyAndGroup(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -631,7 +655,7 @@ func TestAccAWSSpotFleetRequest_placementTenancyAndGroup(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestTenancyGroupConfig(rName, rInt), + 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"), @@ -646,6 +670,7 @@ func TestAccAWSSpotFleetRequest_WithELBs(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -653,7 +678,7 @@ func TestAccAWSSpotFleetRequest_WithELBs(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithELBs(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithELBs(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -670,6 +695,7 @@ func TestAccAWSSpotFleetRequest_WithTargetGroups(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) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -677,7 +703,7 @@ func TestAccAWSSpotFleetRequest_WithTargetGroups(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestConfigWithTargetGroups(rName, rInt), + Config: testAccAWSSpotFleetRequestConfigWithTargetGroups(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSSpotFleetRequestExists( "aws_spot_fleet_request.foo", &sfr), @@ -694,6 +720,7 @@ func TestAccAWSSpotFleetRequest_WithInstanceStoreAmi(t *testing.T) { t.Skip("Test fails due to test harness constraints") rName := acctest.RandString(10) rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -701,7 +728,7 @@ func TestAccAWSSpotFleetRequest_WithInstanceStoreAmi(t *testing.T) { CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotFleetRequestLaunchSpecificationWithInstanceStoreAmi(rName, rInt), + Config: testAccAWSSpotFleetRequestLaunchSpecificationWithInstanceStoreAmi(rName, rInt, validUntil), ExpectError: regexp.MustCompile("Instance store backed AMIs do not provide a root device name"), }, }, @@ -922,13 +949,13 @@ resource "aws_iam_policy_attachment" "test-attach" { `, rName, rInt) } -func testAccAWSSpotFleetRequestConfig(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfig(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true instance_interruption_behaviour = "stop" wait_for_fulfillment = true @@ -939,16 +966,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigAssociatePublicIpAddress(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigAssociatePublicIpAddress(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.027" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -959,16 +986,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigTargetCapacity(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigTargetCapacity(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 3 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q fleet_type = "request" terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -978,17 +1005,17 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigExcessCapacityTermination(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigExcessCapacityTermination(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 excess_capacity_termination_policy = "NoTermination" - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q fleet_type = "request" terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -998,16 +1025,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigFleetType(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigFleetType(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q fleet_type = "request" terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -1017,10 +1044,10 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName string, rInt int) string { +func testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName string, rInt int, validUntil string) string { return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_iam_role" "test-role1" { name = "tf-test-role1-%[1]s" @@ -1068,7 +1095,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[2]q terminate_instances_with_expiration = true instance_interruption_behaviour = "stop" wait_for_fulfillment = true @@ -1080,16 +1107,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`, rName) +`, rName, validUntil) } -func testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.01" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1099,16 +1126,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigWithAzs(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigWithAzs(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1125,11 +1152,11 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigWithSubnet(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigWithSubnet(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" tags = { @@ -1159,7 +1186,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.05" target_capacity = 4 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1176,10 +1203,10 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigWithELBs(rName string, rInt int) string { +func testAccAWSSpotFleetRequestConfigWithELBs(rName string, rInt int, validUntil string) string { return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" @@ -1204,7 +1231,7 @@ resource "aws_subnet" "bar" { } resource "aws_elb" "elb" { - name = "test-elb-%s" + name = "test-elb-%[1]s" subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] internal = true @@ -1220,7 +1247,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.5" target_capacity = 2 - valid_until = "2029-11-04T20:44:20Z" + valid_until = %[2]q terminate_instances_with_expiration = true wait_for_fulfillment = true load_balancers = ["${aws_elb.elb.name}"] @@ -1232,10 +1259,10 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`, rName) +`, rName, validUntil) } -func testAccAWSSpotFleetRequestConfigWithTargetGroups(rName string, rInt int) string { +func testAccAWSSpotFleetRequestConfigWithTargetGroups(rName string, rInt int, validUntil string) string { return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" @@ -1260,7 +1287,7 @@ resource "aws_subnet" "bar" { } resource "aws_alb" "alb" { - name = "test-elb-%s" + name = "test-elb-%[1]s" internal = true subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] } @@ -1287,7 +1314,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.5" target_capacity = 2 - valid_until = "2029-11-04T20:44:20Z" + valid_until = %[2]q terminate_instances_with_expiration = true wait_for_fulfillment = true target_group_arns = ["${aws_alb_target_group.target_group.arn}"] @@ -1299,16 +1326,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`, rName) +`, rName, validUntil) } -func testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.025" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1325,11 +1352,11 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameSubnet(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameSubnet(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" tags = { @@ -1350,7 +1377,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.035" target_capacity = 4 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1367,16 +1394,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.035" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1394,15 +1421,15 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1419,16 +1446,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigMultipleInstancePools(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigMultipleInstancePools(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.7" target_capacity = 30 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q instance_pools_to_use_count = 2 terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -1452,16 +1479,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.7" target_capacity = 30 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q allocation_strategy = "diversified" terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -1485,16 +1512,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.7" target_capacity = 10 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1513,16 +1540,16 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestEBSConfig(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestEBSConfig(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 1 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1543,11 +1570,11 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestLaunchSpecificationEbsBlockDeviceKmsKeyId(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestLaunchSpecificationEbsBlockDeviceKmsKeyId(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` data "aws_ami" "amzn-ami-minimal-hvm-ebs" { most_recent = true owners = ["amazon"] @@ -1572,7 +1599,7 @@ resource "aws_spot_fleet_request" "test" { spot_price = "0.005" target_capacity = 1 terminate_instances_with_expiration = true - valid_until = "2029-11-04T20:44:20Z" + valid_until = %[1]q wait_for_fulfillment = true launch_specification { @@ -1596,11 +1623,11 @@ resource "aws_spot_fleet_request" "test" { depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestLaunchSpecificationRootBlockDeviceKmsKeyId(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestLaunchSpecificationRootBlockDeviceKmsKeyId(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` data "aws_ami" "amzn-ami-minimal-hvm-ebs" { most_recent = true owners = ["amazon"] @@ -1625,7 +1652,7 @@ resource "aws_spot_fleet_request" "test" { spot_price = "0.005" target_capacity = 1 terminate_instances_with_expiration = true - valid_until = "2029-11-04T20:44:20Z" + valid_until = %[1]q wait_for_fulfillment = true launch_specification { @@ -1642,11 +1669,11 @@ resource "aws_spot_fleet_request" "test" { depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestLaunchSpecificationWithInstanceStoreAmi(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestLaunchSpecificationWithInstanceStoreAmi(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` data "aws_ami" "ubuntu_instance_store" { most_recent = true owners = ["099720109477"] # Canonical @@ -1662,7 +1689,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.03" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true @@ -1673,16 +1700,16 @@ resource "aws_spot_fleet_request" "foo" { depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestTagsConfig(rName string, rInt int) string { - return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprint(` +func testAccAWSSpotFleetRequestTagsConfig(rName string, rInt int, validUntil string) string { + return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 1 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[1]q terminate_instances_with_expiration = true wait_for_fulfillment = true launch_specification { @@ -1695,13 +1722,13 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`) +`, validUntil) } -func testAccAWSSpotFleetRequestTenancyGroupConfig(rName string, rInt int) string { +func testAccAWSSpotFleetRequestTenancyGroupConfig(rName string, rInt int, validUntil string) string { return testAccAWSSpotFleetRequestConfigBase(rName, rInt) + fmt.Sprintf(` resource "aws_placement_group" "test" { - name = "test-pg-%s" + name = "test-pg-%[1]s" strategy = "cluster" } @@ -1709,7 +1736,7 @@ resource "aws_spot_fleet_request" "foo" { iam_fleet_role = "${aws_iam_role.test-role.arn}" spot_price = "0.005" target_capacity = 2 - valid_until = "2019-11-04T20:44:20Z" + valid_until = %[2]q terminate_instances_with_expiration = true launch_specification { instance_type = "m1.small" @@ -1720,5 +1747,5 @@ resource "aws_spot_fleet_request" "foo" { } depends_on = ["aws_iam_policy_attachment.test-attach"] } -`, rName) +`, rName, validUntil) } diff --git a/aws/tagsDataPipeline.go b/aws/tagsDataPipeline.go deleted file mode 100644 index 1abaf926d22..00000000000 --- a/aws/tagsDataPipeline.go +++ /dev/null @@ -1,111 +0,0 @@ -package aws - -import ( - "log" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datapipeline" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" -) - -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" -func setTagsDataPipeline(conn *datapipeline.DataPipeline, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsDataPipeline(tagsFromMapDataPipeline(o), tagsFromMapDataPipeline(n)) - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - _, err := conn.RemoveTags(&datapipeline.RemoveTagsInput{ - PipelineId: aws.String(d.Id()), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.AddTags(&datapipeline.AddTagsInput{ - PipelineId: aws.String(d.Id()), - Tags: create, - }) - if err != nil { - return err - } - } - } - return nil -} - -// diffTags takes our tags locally and the ones remotely and returns -// the set of tags that must be created, and the set of tags that must -// be destroyed. -func diffTagsDataPipeline(oldTags, newTags []*datapipeline.Tag) ([]*datapipeline.Tag, []*datapipeline.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - // Build the list of what to remove - var remove []*datapipeline.Tag - for _, t := range oldTags { - old, ok := create[aws.StringValue(t.Key)] - if !ok || old != aws.StringValue(t.Value) { - // Delete it! - remove = append(remove, t) - } else if ok { - // already present so remove from new - delete(create, aws.StringValue(t.Key)) - } - } - return tagsFromMapDataPipeline(create), remove -} - -// tagsFromMap returns the tags for the given map of data. -func tagsFromMapDataPipeline(m map[string]interface{}) []*datapipeline.Tag { - var result []*datapipeline.Tag - for k, v := range m { - t := &datapipeline.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredDataPipeline(t) { - result = append(result, t) - } - } - return result -} - -// tagsToMap turns the list of tags into a map. -func tagsToMapDataPipeline(ts []*datapipeline.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredDataPipeline(t) { - result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) - } - } - return result -} - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredDataPipeline(t *datapipeline.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) - return true - } - } - return false -} diff --git a/aws/tagsDataPipeline_test.go b/aws/tagsDataPipeline_test.go deleted file mode 100644 index 0f70089b200..00000000000 --- a/aws/tagsDataPipeline_test.go +++ /dev/null @@ -1,108 +0,0 @@ -package aws - -import ( - "reflect" - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/datapipeline" -) - -func TestDiffTagsDataPipeline(t *testing.T) { - cases := []struct { - Old, New map[string]interface{} - Create, Remove map[string]string - }{ - // Basic add/remove - { - Old: map[string]interface{}{ - "foo": "bar", - }, - New: map[string]interface{}{ - "bar": "baz", - }, - Create: map[string]string{ - "bar": "baz", - }, - Remove: map[string]string{ - "foo": "bar", - }, - }, - - // Modify - { - Old: map[string]interface{}{ - "foo": "bar", - }, - New: map[string]interface{}{ - "foo": "baz", - }, - Create: map[string]string{ - "foo": "baz", - }, - Remove: map[string]string{ - "foo": "bar", - }, - }, - - // Overlap - { - Old: map[string]interface{}{ - "foo": "bar", - "hello": "world", - }, - New: map[string]interface{}{ - "foo": "baz", - "hello": "world", - }, - Create: map[string]string{ - "foo": "baz", - }, - Remove: map[string]string{ - "foo": "bar", - }, - }, - - // Remove - { - Old: map[string]interface{}{ - "foo": "bar", - "bar": "baz", - }, - New: map[string]interface{}{ - "foo": "bar", - }, - Create: map[string]string{}, - Remove: map[string]string{ - "bar": "baz", - }, - }, - } - for i, tc := range cases { - c, r := diffTagsDataPipeline(tagsFromMapDataPipeline(tc.Old), tagsFromMapDataPipeline(tc.New)) - cm := tagsToMapDataPipeline(c) - rm := tagsToMapDataPipeline(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 TestIgnoringTagsDataPipeline(t *testing.T) { - var ignoredTags []*datapipeline.Tag - ignoredTags = append(ignoredTags, &datapipeline.Tag{ - Key: aws.String("aws:cloudformation:logical-id"), - Value: aws.String("foo"), - }) - ignoredTags = append(ignoredTags, &datapipeline.Tag{ - Key: aws.String("aws:foo:bar"), - Value: aws.String("baz"), - }) - for _, tag := range ignoredTags { - if !tagIgnoredDataPipeline(tag) { - t.Fatalf("Tag %v with value %v not ignored, but should be!", *tag.Key, *tag.Value) - } - } -} diff --git a/aws/tagsRoute53Resolver.go b/aws/tagsRoute53Resolver.go index 4da93f8fb10..953aa489b4d 100644 --- a/aws/tagsRoute53Resolver.go +++ b/aws/tagsRoute53Resolver.go @@ -37,46 +37,6 @@ func getTagsRoute53Resolver(conn *route53resolver.Route53Resolver, d *schema.Res return nil } -// setTags is a helper to set the tags for a resource. It expects the -// tags field to be named "tags" and the ARN field to be named "arn". -func setTagsRoute53Resolver(conn *route53resolver.Route53Resolver, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffTagsRoute53Resolver(tagsFromMapRoute53Resolver(o), tagsFromMapRoute53Resolver(n)) - - // Set tags - if len(remove) > 0 { - log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove)) - for i, t := range remove { - k[i] = t.Key - } - - _, err := conn.UntagResource(&route53resolver.UntagResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - TagKeys: k, - }) - if err != nil { - return err - } - } - if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - _, err := conn.TagResource(&route53resolver.TagResourceInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - Tags: create, - }) - if err != nil { - return err - } - } - } - - return nil -} - // diffTags takes our tags locally and the ones remotely and returns // the set of tags that must be created, and the set of tags that must // be destroyed. diff --git a/aws/tags_sagemaker.go b/aws/tags_sagemaker.go deleted file mode 100644 index 4f88959a4e8..00000000000 --- a/aws/tags_sagemaker.go +++ /dev/null @@ -1,128 +0,0 @@ -package aws - -import ( - "log" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/sagemaker" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" -) - -func tagsFromMapSagemaker(m map[string]interface{}) []*sagemaker.Tag { - result := make([]*sagemaker.Tag, 0, len(m)) - for k, v := range m { - t := &sagemaker.Tag{ - Key: aws.String(k), - Value: aws.String(v.(string)), - } - if !tagIgnoredSagemaker(t) { - result = append(result, t) - } - } - - return result -} - -func tagsToMapSagemaker(ts []*sagemaker.Tag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredSagemaker(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - -func setSagemakerTags(conn *sagemaker.SageMaker, d *schema.ResourceData) error { - if d.HasChange("tags") { - oraw, nraw := d.GetChange("tags") - o := oraw.(map[string]interface{}) - n := nraw.(map[string]interface{}) - create, remove := diffSagemakerTags(tagsFromMapSagemaker(o), tagsFromMapSagemaker(n)) - - if len(remove) > 0 { - input := &sagemaker.DeleteTagsInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - TagKeys: remove, - } - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) - _, err := conn.DeleteTags(input) - if err != nil { - sagemakerErr, ok := err.(awserr.Error) - if ok && sagemakerErr.Code() == "ResourceNotFound" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if isResourceTimeoutError(err) { - _, err = conn.DeleteTags(input) - } - if err != nil { - return err - } - } - if len(create) > 0 { - input := &sagemaker.AddTagsInput{ - ResourceArn: aws.String(d.Get("arn").(string)), - Tags: create, - } - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) - _, err := conn.AddTags(input) - if err != nil { - sagemakerErr, ok := err.(awserr.Error) - if ok && sagemakerErr.Code() == "ResourceNotFound" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - if isResourceTimeoutError(err) { - _, err = conn.AddTags(input) - } - if err != nil { - return err - } - } - } - - return nil -} - -func diffSagemakerTags(oldTags, newTags []*sagemaker.Tag) ([]*sagemaker.Tag, []*string) { - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - var remove []*string - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - remove = append(remove, t.Key) - } - } - - return tagsFromMapSagemaker(create), remove -} - -func tagIgnoredSagemaker(t *sagemaker.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/go.mod b/go.mod index 9c5bb672c11..76e6977dc4f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 // indirect - github.com/aws/aws-sdk-go v1.25.34 + github.com/aws/aws-sdk-go v1.25.35 github.com/beevik/etree v1.1.0 github.com/bflad/tfproviderlint v0.5.0 github.com/client9/misspell v0.3.4 diff --git a/go.sum b/go.sum index 32d61828260..d66339d9d82 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.19.39/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.34 h1:roL040qe1npx1ToFeXYHOGp/nOpLbcIQHKZ5UeDIyIM= -github.com/aws/aws-sdk-go v1.25.34/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.35 h1:fe2tJnqty/v/50pyngKdNk/NP8PFphYDA1Z7N3EiiiE= +github.com/aws/aws-sdk-go v1.25.35/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 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= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 8a7699b9619..93ebbcc13f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -249,6 +249,9 @@ type Config struct { // STSRegionalEndpoint will enable regional or legacy endpoint resolving STSRegionalEndpoint endpoints.STSRegionalEndpoint + + // S3UsEast1RegionalEndpoint will enable regional or legacy endpoint resolving + S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint } // NewConfig returns a new Config pointer that can be chained with builder @@ -430,6 +433,13 @@ func (c *Config) WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Con return c } +// WithS3UsEast1RegionalEndpoint will set whether or not to use regional endpoint flag +// when resolving the endpoint for a service +func (c *Config) WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEndpoint) *Config { + c.S3UsEast1RegionalEndpoint = sre + return c +} + func mergeInConfig(dst *Config, other *Config) { if other == nil { return @@ -534,6 +544,10 @@ func mergeInConfig(dst *Config, other *Config) { if other.STSRegionalEndpoint != endpoints.UnsetSTSEndpoint { dst.STSRegionalEndpoint = other.STSRegionalEndpoint } + + if other.S3UsEast1RegionalEndpoint != endpoints.UnsetS3UsEast1Endpoint { + dst.S3UsEast1RegionalEndpoint = other.S3UsEast1RegionalEndpoint + } } // Copy will return a shallow copy of the Config object. If any additional diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go index 87b9ff3ffec..343a2106f81 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go @@ -83,6 +83,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol p := &ps[i] custAddEC2Metadata(p) custAddS3DualStack(p) + custRegionalS3(p) custRmIotDataService(p) custFixAppAutoscalingChina(p) custFixAppAutoscalingUsGov(p) @@ -100,6 +101,33 @@ func custAddS3DualStack(p *partition) { custAddDualstack(p, "s3-control") } +func custRegionalS3(p *partition) { + if p.ID != "aws" { + return + } + + service, ok := p.Services["s3"] + if !ok { + return + } + + // If global endpoint already exists no customization needed. + if _, ok := service.Endpoints["aws-global"]; ok { + return + } + + service.PartitionEndpoint = "aws-global" + service.Endpoints["us-east-1"] = endpoint{} + service.Endpoints["aws-global"] = endpoint{ + Hostname: "s3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + } + + p.Services["s3"] = service +} + func custAddDualstack(p *partition, svcName string) { s, ok := p.Services[svcName] if !ok { 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 0339b95add2..de07715d57a 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 @@ -1710,11 +1710,16 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-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{}, @@ -3071,7 +3076,7 @@ var awsPartition = partition{ }, }, "s3": service{ - PartitionEndpoint: "us-east-1", + PartitionEndpoint: "aws-global", IsRegionalized: boxedTrue, Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -3096,6 +3101,12 @@ var awsPartition = partition{ Hostname: "s3.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, + "aws-global": endpoint{ + Hostname: "s3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, @@ -3117,10 +3128,7 @@ var awsPartition = partition{ Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, - "us-east-1": endpoint{ - Hostname: "s3.amazonaws.com", - SignatureVersions: []string{"s3", "s3v4"}, - }, + "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{ Hostname: "s3.us-west-1.amazonaws.com", @@ -3526,26 +3534,11 @@ var awsPartition = partition{ "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ - SSLCommonName: "shield.ca-central-1.amazonaws.com", + SSLCommonName: "shield.us-east-1.amazonaws.com", 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{}, + "us-east-1": endpoint{}, }, }, "sms": service{ @@ -4237,6 +4230,12 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "dax": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, + }, + }, "directconnect": service{ Endpoints: endpoints{ @@ -4624,6 +4623,12 @@ var awscnPartition = partition{ }, }, }, + "workspaces": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, + }, + }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index fadff07d64c..1f53d9cb686 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -50,12 +50,28 @@ type Options struct { // STS Regional Endpoint flag helps with resolving the STS endpoint STSRegionalEndpoint STSRegionalEndpoint + + // S3 Regional Endpoint flag helps with resolving the S3 endpoint + S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint } -// STSRegionalEndpoint is an enum type alias for int -// It is used internally by the core sdk as STS Regional Endpoint flag value +// STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint +// options. type STSRegionalEndpoint int +func (e STSRegionalEndpoint) String() string { + switch e { + case LegacySTSEndpoint: + return "legacy" + case RegionalSTSEndpoint: + return "regional" + case UnsetSTSEndpoint: + return "" + default: + return "unknown" + } +} + const ( // UnsetSTSEndpoint represents that STS Regional Endpoint flag is not specified. @@ -86,6 +102,55 @@ func GetSTSRegionalEndpoint(s string) (STSRegionalEndpoint, error) { } } +// S3UsEast1RegionalEndpoint is an enum for the states of the S3 us-east-1 +// Regional Endpoint options. +type S3UsEast1RegionalEndpoint int + +func (e S3UsEast1RegionalEndpoint) String() string { + switch e { + case LegacyS3UsEast1Endpoint: + return "legacy" + case RegionalS3UsEast1Endpoint: + return "regional" + case UnsetS3UsEast1Endpoint: + return "" + default: + return "unknown" + } +} + +const ( + + // UnsetS3UsEast1Endpoint represents that S3 Regional Endpoint flag is not + // specified. + UnsetS3UsEast1Endpoint S3UsEast1RegionalEndpoint = iota + + // LegacyS3UsEast1Endpoint represents when S3 Regional Endpoint flag is + // specified to use legacy endpoints. + LegacyS3UsEast1Endpoint + + // RegionalS3UsEast1Endpoint represents when S3 Regional Endpoint flag is + // specified to use regional endpoints. + RegionalS3UsEast1Endpoint +) + +// GetS3UsEast1RegionalEndpoint function returns the S3UsEast1RegionalEndpointFlag based +// on the input string provided in env config or shared config by the user. +// +// `legacy`, `regional` are the only case-insensitive valid strings for +// resolving the S3 regional Endpoint flag. +func GetS3UsEast1RegionalEndpoint(s string) (S3UsEast1RegionalEndpoint, error) { + switch { + case strings.EqualFold(s, "legacy"): + return LegacyS3UsEast1Endpoint, nil + case strings.EqualFold(s, "regional"): + return RegionalS3UsEast1Endpoint, nil + default: + return UnsetS3UsEast1Endpoint, + fmt.Errorf("unable to resolve the value of S3UsEast1RegionalEndpoint for %v", s) + } +} + // Set combines all of the option functions together. func (o *Options) Set(optFns ...func(*Options)) { for _, fn := range optFns { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go new file mode 100644 index 00000000000..df75e899adb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go @@ -0,0 +1,24 @@ +package endpoints + +var legacyGlobalRegions = map[string]map[string]struct{}{ + "sts": { + "ap-northeast-1": {}, + "ap-south-1": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "ca-central-1": {}, + "eu-central-1": {}, + "eu-north-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "eu-west-3": {}, + "sa-east-1": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-1": {}, + "us-west-2": {}, + }, + "s3": { + "us-east-1": {}, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/sts_legacy_regions.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/sts_legacy_regions.go deleted file mode 100644 index 26139621972..00000000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/sts_legacy_regions.go +++ /dev/null @@ -1,19 +0,0 @@ -package endpoints - -var stsLegacyGlobalRegions = map[string]struct{}{ - "ap-northeast-1": {}, - "ap-south-1": {}, - "ap-southeast-1": {}, - "ap-southeast-2": {}, - "ca-central-1": {}, - "eu-central-1": {}, - "eu-north-1": {}, - "eu-west-1": {}, - "eu-west-2": {}, - "eu-west-3": {}, - "sa-east-1": {}, - "us-east-1": {}, - "us-east-2": {}, - "us-west-1": {}, - "us-west-2": {}, -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index 7b09adff63e..eb2ac83c992 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -110,8 +110,9 @@ func (p partition) EndpointFor(service, region string, opts ...func(*Options)) ( region = s.PartitionEndpoint } - if service == "sts" && opt.STSRegionalEndpoint != RegionalSTSEndpoint { - if _, ok := stsLegacyGlobalRegions[region]; ok { + if (service == "sts" && opt.STSRegionalEndpoint != RegionalSTSEndpoint) || + (service == "s3" && opt.S3UsEast1RegionalEndpoint != RegionalS3UsEast1Endpoint) { + if _, ok := legacyGlobalRegions[service][region]; ok { region = "aws-global" } } @@ -240,11 +241,23 @@ func (e endpoint) resolve(service, partitionID, region, dnsSuffix string, defs [ merged.mergeIn(e) e = merged - hostname := e.Hostname + signingRegion := e.CredentialScope.Region + if len(signingRegion) == 0 { + signingRegion = region + } + signingName := e.CredentialScope.Service + var signingNameDerived bool + if len(signingName) == 0 { + signingName = service + signingNameDerived = true + } + + hostname := e.Hostname // Offset the hostname for dualstack if enabled if opts.UseDualStack && e.HasDualStack == boxedTrue { hostname = e.DualStackHostname + region = signingRegion } u := strings.Replace(hostname, "{service}", service, 1) @@ -254,18 +267,6 @@ func (e endpoint) resolve(service, partitionID, region, dnsSuffix string, defs [ scheme := getEndpointScheme(e.Protocols, opts.DisableSSL) u = fmt.Sprintf("%s://%s", scheme, u) - signingRegion := e.CredentialScope.Region - if len(signingRegion) == 0 { - signingRegion = region - } - - signingName := e.CredentialScope.Service - var signingNameDerived bool - if len(signingName) == 0 { - signingName = service - signingNameDerived = true - } - return ResolvedEndpoint{ URL: u, PartitionID: partitionID, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go index f093fc542df..64784e16f3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go @@ -17,11 +17,13 @@ import ( // does the pagination between API operations, and Paginator defines the // configuration that will be used per page request. // -// cont := true -// for p.Next() && cont { +// for p.Next() { // data := p.Page().(*s3.ListObjectsOutput) // // process the page's data +// // ... +// // break out of loop to stop fetching additional pages // } +// // return p.Err() // // See service client API operation Pages methods for examples how the SDK will 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 7713ccfca5e..cc64e24f1d5 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 @@ -47,10 +47,10 @@ func resolveCredentials(cfg *aws.Config, } // WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but -// 'AWS_IAM_ROLE_ARN' was not set. +// 'AWS_ROLE_ARN' was not set. var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil) -// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_IAM_ROLE_ARN' was set but +// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_ROLE_ARN' was set but // 'AWS_WEB_IDENTITY_TOKEN_FILE' was not set. var WebIdentityEmptyTokenFilePathErr = awserr.New(stscreds.ErrCodeWebIdentity, "token file path is not set", nil) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index 530cc3a9c06..4092ab8fb7e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -128,11 +128,19 @@ type envConfig struct { // AWS_ROLE_SESSION_NAME=session_name RoleSessionName string - // Specifies the Regional Endpoint flag for the sdk to resolve the endpoint for a service + // Specifies the STS Regional Endpoint flag for the SDK to resolve the endpoint + // for a service. // - // AWS_STS_REGIONAL_ENDPOINTS =sts_regional_endpoint + // AWS_STS_REGIONAL_ENDPOINTS=regional // This can take value as `regional` or `legacy` STSRegionalEndpoint endpoints.STSRegionalEndpoint + + // Specifies the S3 Regional Endpoint flag for the SDK to resolve the + // endpoint for a service. + // + // AWS_S3_US_EAST_1_REGIONAL_ENDPOINT=regional + // This can take value as `regional` or `legacy` + S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint } var ( @@ -190,6 +198,9 @@ var ( stsRegionalEndpointKey = []string{ "AWS_STS_REGIONAL_ENDPOINTS", } + s3UsEast1RegionalEndpoint = []string{ + "AWS_S3_US_EAST_1_REGIONAL_ENDPOINT", + } ) // loadEnvConfig retrieves the SDK's environment configuration. @@ -275,14 +286,24 @@ func envConfigLoad(enableSharedConfig bool) (envConfig, error) { cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE") + var err error // STS Regional Endpoint variable for _, k := range stsRegionalEndpointKey { if v := os.Getenv(k); len(v) != 0 { - STSRegionalEndpoint, err := endpoints.GetSTSRegionalEndpoint(v) + cfg.STSRegionalEndpoint, err = endpoints.GetSTSRegionalEndpoint(v) + if err != nil { + return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err) + } + } + } + + // S3 Regional Endpoint variable + for _, k := range s3UsEast1RegionalEndpoint { + if v := os.Getenv(k); len(v) != 0 { + cfg.S3UsEast1RegionalEndpoint, err = endpoints.GetS3UsEast1RegionalEndpoint(v) if err != nil { return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err) } - cfg.STSRegionalEndpoint = STSRegionalEndpoint } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 15fa647699f..ab6daac7c30 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -555,7 +555,20 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, } // Regional Endpoint flag for STS endpoint resolving - mergeSTSRegionalEndpointConfig(cfg, envCfg, sharedCfg) + mergeSTSRegionalEndpointConfig(cfg, []endpoints.STSRegionalEndpoint{ + userCfg.STSRegionalEndpoint, + envCfg.STSRegionalEndpoint, + sharedCfg.STSRegionalEndpoint, + endpoints.LegacySTSEndpoint, + }) + + // Regional Endpoint flag for S3 endpoint resolving + mergeS3UsEast1RegionalEndpointConfig(cfg, []endpoints.S3UsEast1RegionalEndpoint{ + userCfg.S3UsEast1RegionalEndpoint, + envCfg.S3UsEast1RegionalEndpoint, + sharedCfg.S3UsEast1RegionalEndpoint, + endpoints.LegacyS3UsEast1Endpoint, + }) // Configure credentials if not already set by the user when creating the // Session. @@ -570,20 +583,22 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, return nil } -// mergeSTSRegionalEndpointConfig function merges the STSRegionalEndpoint into cfg from -// envConfig and SharedConfig with envConfig being given precedence over SharedConfig -func mergeSTSRegionalEndpointConfig(cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig) error { - - cfg.STSRegionalEndpoint = envCfg.STSRegionalEndpoint - - if cfg.STSRegionalEndpoint == endpoints.UnsetSTSEndpoint { - cfg.STSRegionalEndpoint = sharedCfg.STSRegionalEndpoint +func mergeSTSRegionalEndpointConfig(cfg *aws.Config, values []endpoints.STSRegionalEndpoint) { + for _, v := range values { + if v != endpoints.UnsetSTSEndpoint { + cfg.STSRegionalEndpoint = v + break + } } +} - if cfg.STSRegionalEndpoint == endpoints.UnsetSTSEndpoint { - cfg.STSRegionalEndpoint = endpoints.LegacySTSEndpoint +func mergeS3UsEast1RegionalEndpointConfig(cfg *aws.Config, values []endpoints.S3UsEast1RegionalEndpoint) { + for _, v := range values { + if v != endpoints.UnsetS3UsEast1Endpoint { + cfg.S3UsEast1RegionalEndpoint = v + break + } } - return nil } func initHandlers(s *Session) { @@ -653,6 +668,11 @@ func (s *Session) resolveEndpoint(service, region string, cfg *aws.Config) (endp // precedence. opt.STSRegionalEndpoint = cfg.STSRegionalEndpoint + // Support for S3UsEast1RegionalEndpoint where the S3UsEast1RegionalEndpoint is + // provided in envConfig or sharedConfig with envConfig getting + // precedence. + opt.S3UsEast1RegionalEndpoint = cfg.S3UsEast1RegionalEndpoint + // Support the condition where the service is modeled but its // endpoint metadata is not available. opt.ResolveUnknownService = true 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 8574668960b..1d7b049cf7c 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 @@ -44,6 +44,9 @@ const ( // Additional config fields for regional or legacy endpoints stsRegionalEndpointSharedKey = `sts_regional_endpoints` + // Additional config fields for regional or legacy endpoints + s3UsEast1RegionalSharedKey = `s3_us_east_1_regional_endpoint` + // DefaultSharedConfigProfile is the default profile to be used when // loading configuration from the config files if another profile name // is not provided. @@ -92,11 +95,17 @@ type sharedConfig struct { CSMPort string CSMClientID string - // Specifies the Regional Endpoint flag for the sdk to resolve the endpoint for a service + // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service // - // sts_regional_endpoints = sts_regional_endpoint + // sts_regional_endpoints = regional // This can take value as `LegacySTSEndpoint` or `RegionalSTSEndpoint` STSRegionalEndpoint endpoints.STSRegionalEndpoint + + // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service + // + // s3_us_east_1_regional_endpoint = regional + // This can take value as `LegacyS3UsEast1Endpoint` or `RegionalS3UsEast1Endpoint` + S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint } type sharedConfigFile struct { @@ -259,10 +268,19 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e sre, err := endpoints.GetSTSRegionalEndpoint(v) if err != nil { return fmt.Errorf("failed to load %s from shared config, %s, %v", - stsRegionalEndpointKey, file.Filename, err) + stsRegionalEndpointSharedKey, file.Filename, err) } cfg.STSRegionalEndpoint = sre } + + if v := section.String(s3UsEast1RegionalSharedKey); len(v) != 0 { + sre, err := endpoints.GetS3UsEast1RegionalEndpoint(v) + if err != nil { + return fmt.Errorf("failed to load %s from shared config, %s, %v", + s3UsEast1RegionalSharedKey, file.Filename, err) + } + cfg.S3UsEast1RegionalEndpoint = sre + } } updateString(&cfg.CredentialProcess, section, credentialProcessKey) 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 9e5d1a9c385..b03cfb752dd 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.25.34" +const SDKVersion = "1.25.35" 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 575c8261a63..301fda23bf0 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 @@ -749,10 +749,12 @@ func (c *ACM) ListCertificatesPagesWithContext(ctx aws.Context, input *ListCerti }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b9f53ae7a2d..c600b04c0a5 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 @@ -1378,10 +1378,12 @@ func (c *ACMPCA) ListCertificateAuthoritiesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1530,10 +1532,12 @@ func (c *ACMPCA) ListPermissionsPagesWithContext(ctx aws.Context, input *ListPer }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPermissionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPermissionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1677,10 +1681,12 @@ func (c *ACMPCA) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 41fd5458bf5..2ac48ac1cbe 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 @@ -3842,10 +3842,12 @@ func (c *APIGateway) GetApiKeysPagesWithContext(ctx aws.Context, input *GetApiKe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetApiKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetApiKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4238,10 +4240,12 @@ func (c *APIGateway) GetBasePathMappingsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBasePathMappingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBasePathMappingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4461,10 +4465,12 @@ func (c *APIGateway) GetClientCertificatesPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetClientCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetClientCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4692,10 +4698,12 @@ func (c *APIGateway) GetDeploymentsPagesWithContext(ctx aws.Context, input *GetD }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDeploymentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetDeploymentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5252,10 +5260,12 @@ func (c *APIGateway) GetDomainNamesPagesWithContext(ctx aws.Context, input *GetD }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDomainNamesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetDomainNamesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6162,10 +6172,12 @@ func (c *APIGateway) GetModelsPagesWithContext(ctx aws.Context, input *GetModels }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetModelsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetModelsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6558,10 +6570,12 @@ func (c *APIGateway) GetResourcesPagesWithContext(ctx aws.Context, input *GetRes }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6781,10 +6795,12 @@ func (c *APIGateway) GetRestApisPagesWithContext(ctx aws.Context, input *GetRest }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetRestApisOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetRestApisOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7430,10 +7446,12 @@ func (c *APIGateway) GetUsagePagesWithContext(ctx aws.Context, input *GetUsageIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*Usage), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*Usage), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7748,10 +7766,12 @@ func (c *APIGateway) GetUsagePlanKeysPagesWithContext(ctx aws.Context, input *Ge }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUsagePlanKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetUsagePlanKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7895,10 +7915,12 @@ func (c *APIGateway) GetUsagePlansPagesWithContext(ctx aws.Context, input *GetUs }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUsagePlansOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetUsagePlansOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8118,10 +8140,12 @@ func (c *APIGateway) GetVpcLinksPagesWithContext(ctx aws.Context, input *GetVpcL }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetVpcLinksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetVpcLinksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 7d560dc2002..4a7e21e00ff 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 @@ -463,10 +463,12 @@ func (c *ApplicationAutoScaling) DescribeScalableTargetsPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalableTargetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScalableTargetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -617,10 +619,12 @@ func (c *ApplicationAutoScaling) DescribeScalingActivitiesPagesWithContext(ctx a }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -777,10 +781,12 @@ func (c *ApplicationAutoScaling) DescribeScalingPoliciesPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScalingPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -930,10 +936,12 @@ func (c *ApplicationAutoScaling) DescribeScheduledActionsPagesWithContext(ctx aw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 249f1cd2f9a..737a831f0e1 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 @@ -1093,10 +1093,12 @@ func (c *ApplicationInsights) ListApplicationsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1234,10 +1236,12 @@ func (c *ApplicationInsights) ListComponentsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListComponentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListComponentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1375,10 +1379,12 @@ func (c *ApplicationInsights) ListProblemsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProblemsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProblemsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b9c5476838e..8edd40ee04d 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 @@ -1734,10 +1734,12 @@ func (c *AppMesh) ListMeshesPagesWithContext(ctx aws.Context, input *ListMeshesI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMeshesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMeshesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1887,10 +1889,12 @@ func (c *AppMesh) ListRoutesPagesWithContext(ctx aws.Context, input *ListRoutesI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRoutesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRoutesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2040,10 +2044,12 @@ func (c *AppMesh) ListTagsForResourcePagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2193,10 +2199,12 @@ func (c *AppMesh) ListVirtualNodesPagesWithContext(ctx aws.Context, input *ListV }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualNodesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVirtualNodesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2346,10 +2354,12 @@ func (c *AppMesh) ListVirtualRoutersPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualRoutersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVirtualRoutersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2499,10 +2509,12 @@ func (c *AppMesh) ListVirtualServicesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualServicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVirtualServicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 a04d00dd34e..933088a1b45 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 @@ -2176,10 +2176,12 @@ func (c *AppStream) DescribeImagePermissionsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImagePermissionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImagePermissionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2316,10 +2318,12 @@ func (c *AppStream) DescribeImagesPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 0ac6d4b96c3..b79ff0629d3 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 @@ -862,10 +862,12 @@ func (c *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQuer }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1091,10 +1093,12 @@ func (c *Athena) ListNamedQueriesPagesWithContext(ctx aws.Context, input *ListNa }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1237,10 +1241,12 @@ func (c *Athena) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1464,10 +1470,12 @@ func (c *Athena) ListWorkGroupsPagesWithContext(ctx aws.Context, input *ListWork }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWorkGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index d1df5efe58f..87b84c1a8f2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -1780,10 +1780,12 @@ func (c *AutoScaling) DescribeAutoScalingGroupsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1919,10 +1921,12 @@ func (c *AutoScaling) DescribeAutoScalingInstancesPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2138,10 +2142,12 @@ func (c *AutoScaling) DescribeLaunchConfigurationsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2691,10 +2697,12 @@ func (c *AutoScaling) DescribeNotificationConfigurationsPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2833,10 +2841,12 @@ func (c *AutoScaling) DescribePoliciesPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2972,10 +2982,12 @@ func (c *AutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3193,10 +3205,12 @@ func (c *AutoScaling) DescribeScheduledActionsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3341,10 +3355,12 @@ func (c *AutoScaling) DescribeTagsPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 8dca70a5f04..7d8513a621c 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 @@ -2271,10 +2271,12 @@ func (c *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBack }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2417,10 +2419,12 @@ func (c *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2564,10 +2568,12 @@ func (c *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2711,10 +2717,12 @@ func (c *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBac }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2857,10 +2865,12 @@ func (c *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3003,10 +3013,12 @@ func (c *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBa }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3144,10 +3156,12 @@ func (c *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3290,10 +3304,12 @@ func (c *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3436,10 +3452,12 @@ func (c *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3582,10 +3600,12 @@ func (c *Backup) ListRestoreJobsPagesWithContext(ctx aws.Context, input *ListRes }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3728,10 +3748,12 @@ func (c *Backup) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 d061b1533d1..27943044c88 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 @@ -717,10 +717,12 @@ func (c *Batch) DescribeComputeEnvironmentsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeComputeEnvironmentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeComputeEnvironmentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -858,10 +860,12 @@ func (c *Batch) DescribeJobDefinitionsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeJobDefinitionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeJobDefinitionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -998,10 +1002,12 @@ func (c *Batch) DescribeJobQueuesPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeJobQueuesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeJobQueuesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1233,10 +1239,12 @@ func (c *Batch) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 e6eda869ff2..299883bccd3 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 @@ -552,10 +552,12 @@ func (c *Cloud9) DescribeEnvironmentMembershipsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEnvironmentMembershipsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEnvironmentMembershipsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -899,10 +901,12 @@ func (c *Cloud9) ListEnvironmentsPagesWithContext(ctx aws.Context, input *ListEn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEnvironmentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEnvironmentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 c79f716f12d..53df8f6eb52 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 @@ -1305,10 +1305,12 @@ func (c *CloudFormation) DescribeStackEventsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStackEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeStackEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1609,10 +1611,12 @@ func (c *CloudFormation) DescribeStackResourceDriftsPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1994,10 +1998,12 @@ func (c *CloudFormation) DescribeStacksPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStacksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeStacksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2822,10 +2828,12 @@ func (c *CloudFormation) ListExportsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExportsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListExportsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2958,10 +2966,12 @@ func (c *CloudFormation) ListImportsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3172,10 +3182,12 @@ func (c *CloudFormation) ListStackResourcesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStackResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStackResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3542,10 +3554,12 @@ func (c *CloudFormation) ListStacksPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStacksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStacksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index fa0d4110598..427393e37ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -3025,10 +3025,12 @@ func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3160,10 +3162,12 @@ func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3543,10 +3547,12 @@ func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3757,10 +3763,12 @@ func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 36a9efd616a..3011f741854 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 @@ -728,10 +728,12 @@ func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -881,10 +883,12 @@ func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1132,10 +1136,12 @@ func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 10b9bbdc42d..4a92c66f38c 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 @@ -996,10 +996,12 @@ func (c *CloudTrail) ListPublicKeysPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1166,10 +1168,12 @@ func (c *CloudTrail) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1304,10 +1308,12 @@ func (c *CloudTrail) ListTrailsPagesWithContext(ctx aws.Context, input *ListTrai }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1478,10 +1484,12 @@ func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *Lookup }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4fcd5618a7b..558e792d03d 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 @@ -402,10 +402,12 @@ func (c *CloudWatch) DescribeAlarmHistoryPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAlarmHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeAlarmHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -539,10 +541,12 @@ func (c *CloudWatch) DescribeAlarmsPagesWithContext(ctx aws.Context, input *Desc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeAlarmsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeAlarmsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1117,10 +1121,12 @@ func (c *CloudWatch) GetMetricDataPagesWithContext(ctx aws.Context, input *GetMe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetMetricDataOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetMetricDataOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1490,10 +1496,12 @@ func (c *CloudWatch) ListDashboardsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDashboardsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDashboardsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1636,10 +1644,12 @@ func (c *CloudWatch) ListMetricsPagesWithContext(ctx aws.Context, input *ListMet }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMetricsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMetricsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 87cbacabc29..2d5c1f0d7bd 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 @@ -1287,10 +1287,12 @@ func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1510,10 +1512,12 @@ func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1657,10 +1661,12 @@ func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1801,10 +1807,12 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2115,10 +2123,12 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2362,10 +2372,12 @@ func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2509,10 +2521,12 @@ func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *Ge }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4288448dbb5..d8a0fd563f0 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 @@ -1941,10 +1941,12 @@ func (c *CodeCommit) DescribeMergeConflictsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeMergeConflictsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeMergeConflictsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2117,10 +2119,12 @@ func (c *CodeCommit) DescribePullRequestEventsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePullRequestEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePullRequestEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2616,10 +2620,12 @@ func (c *CodeCommit) GetCommentsForComparedCommitPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCommentsForComparedCommitOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetCommentsForComparedCommitOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2809,10 +2815,12 @@ func (c *CodeCommit) GetCommentsForPullRequestPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCommentsForPullRequestOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetCommentsForPullRequestOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3110,10 +3118,12 @@ func (c *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetD }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDifferencesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetDifferencesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3687,10 +3697,12 @@ func (c *CodeCommit) GetMergeConflictsPagesWithContext(ctx aws.Context, input *G }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetMergeConflictsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetMergeConflictsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4301,10 +4313,12 @@ func (c *CodeCommit) ListBranchesPagesWithContext(ctx aws.Context, input *ListBr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBranchesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBranchesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4479,10 +4493,12 @@ func (c *CodeCommit) ListPullRequestsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPullRequestsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPullRequestsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4620,10 +4636,12 @@ func (c *CodeCommit) ListRepositoriesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRepositoriesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRepositoriesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 de8c21179c7..daa280bc127 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 @@ -2796,10 +2796,12 @@ func (c *CodeDeploy) ListApplicationRevisionsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationRevisionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationRevisionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2931,10 +2933,12 @@ func (c *CodeDeploy) ListApplicationsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3066,10 +3070,12 @@ func (c *CodeDeploy) ListDeploymentConfigsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentConfigsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDeploymentConfigsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3211,10 +3217,12 @@ func (c *CodeDeploy) ListDeploymentGroupsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDeploymentGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3394,10 +3402,12 @@ func (c *CodeDeploy) ListDeploymentInstancesPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDeploymentInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3657,10 +3667,12 @@ func (c *CodeDeploy) ListDeploymentsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDeploymentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDeploymentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 372dfb8fa48..8ff08bfc20a 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 @@ -1491,10 +1491,12 @@ func (c *CodePipeline) ListActionExecutionsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActionExecutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListActionExecutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1631,10 +1633,12 @@ func (c *CodePipeline) ListActionTypesPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActionTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListActionTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1773,10 +1777,12 @@ func (c *CodePipeline) ListPipelineExecutionsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelineExecutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPipelineExecutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1912,10 +1918,12 @@ func (c *CodePipeline) ListPipelinesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2057,10 +2065,12 @@ func (c *CodePipeline) ListTagsForResourcePagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2198,10 +2208,12 @@ func (c *CodePipeline) ListWebhooksPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWebhooksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWebhooksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 94c87f10b16..a21cb8d27cc 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 @@ -1823,10 +1823,12 @@ func (c *CognitoIdentityProvider) AdminListGroupsForUserPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*AdminListGroupsForUserOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*AdminListGroupsForUserOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1980,10 +1982,12 @@ func (c *CognitoIdentityProvider) AdminListUserAuthEventsPagesWithContext(ctx aw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*AdminListUserAuthEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*AdminListUserAuthEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7534,10 +7538,12 @@ func (c *CognitoIdentityProvider) ListGroupsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7684,10 +7690,12 @@ func (c *CognitoIdentityProvider) ListIdentityProvidersPagesWithContext(ctx aws. }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListIdentityProvidersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListIdentityProvidersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7834,10 +7842,12 @@ func (c *CognitoIdentityProvider) ListResourceServersPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourceServersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResourceServersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8178,10 +8188,12 @@ func (c *CognitoIdentityProvider) ListUserPoolClientsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUserPoolClientsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUserPoolClientsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8324,10 +8336,12 @@ func (c *CognitoIdentityProvider) ListUserPoolsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUserPoolsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUserPoolsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8474,10 +8488,12 @@ func (c *CognitoIdentityProvider) ListUsersPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8626,10 +8642,12 @@ func (c *CognitoIdentityProvider) ListUsersInGroupPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUsersInGroupOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUsersInGroupOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10238,6 +10256,9 @@ func (c *CognitoIdentityProvider) UpdateGroupRequest(input *UpdateGroupInput) (r // // Calling this action requires developer credentials. // +// If you don't provide a value for an attribute, it will be set to the default +// 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. @@ -10429,6 +10450,9 @@ func (c *CognitoIdentityProvider) UpdateResourceServerRequest(input *UpdateResou // // Updates the name and scopes of resource server. All other fields are read-only. // +// If you don't provide a value for an attribute, it will be set to the default +// 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. @@ -10668,9 +10692,11 @@ func (c *CognitoIdentityProvider) UpdateUserPoolRequest(input *UpdateUserPoolInp // UpdateUserPool API operation for Amazon Cognito Identity Provider. // -// Updates the specified user pool with the specified attributes. If you don't -// provide a value for an attribute, it will be set to the default value. You -// can get a list of the current user pool settings with . +// Updates the specified user pool with the specified attributes. You can get +// a list of the current user pool settings with . +// +// If you don't provide a value for an attribute, it will be set to the default +// 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 @@ -10789,8 +10815,10 @@ func (c *CognitoIdentityProvider) UpdateUserPoolClientRequest(input *UpdateUserP // UpdateUserPoolClient API operation for Amazon Cognito Identity Provider. // // Updates the specified user pool app client with the specified attributes. +// You can get a list of the current user pool app client settings with . +// // If you don't provide a value for an attribute, it will be set to the default -// value. You can get a list of the current user pool app client settings with . +// 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 @@ -12809,6 +12837,11 @@ type AdminInitiateAuthInput struct { // will invoke the user migration Lambda if the USERNAME is not found in // the user pool. // + // * ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. + // This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, + // Cognito receives the password in the request instead of using the SRP + // process to verify passwords. + // // AuthFlow is a required field AuthFlow *string `type:"string" required:"true" enum:"AuthFlowType"` @@ -15458,13 +15491,13 @@ type ConfirmForgotPasswordInput struct { // // You create custom workflows by assigning AWS Lambda functions to user pool // triggers. When you use the ConfirmForgotPassword API action, Amazon Cognito - // invokes the functions that are assigned to the post confirmation and pre - // mutation triggers. When Amazon Cognito invokes either of these functions, - // it passes a JSON payload, which the function receives as input. This payload - // contains a clientMetadata attribute, which provides the data that you assigned - // to the ClientMetadata parameter in your ConfirmForgotPassword request. In - // your function code in AWS Lambda, you can process the clientMetadata value - // to enhance your workflow for your specific needs. + // invokes the function that is assigned to the post confirmation trigger. When + // Amazon Cognito invokes this function, it passes a JSON payload, which the + // function receives as input. This payload contains a clientMetadata attribute, + // which provides the data that you assigned to the ClientMetadata parameter + // in your ConfirmForgotPassword request. In your function code in AWS Lambda, + // you can process the clientMetadata value to enhance your workflow for your + // specific needs. // // For more information, see Customizing User Pool Workflows with Lambda Triggers // (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) @@ -16431,7 +16464,28 @@ type CreateUserPoolClientInput struct { // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` - // The explicit authentication flows. + // The authentication flows that are supported by the user pool clients. Flow + // names without the ALLOW_ prefix are deprecated in favor of new names with + // the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along + // with values without ALLOW_ prefix. + // + // Valid values include: + // + // * ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication + // flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH + // setting. With this authentication flow, Cognito receives the password + // in the request instead of using the SRP (Secure Remote Password protocol) + // protocol to verify passwords. + // + // * ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication. + // + // * ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. + // In this flow, Cognito receives the password in the request instead of + // using the SRP protocol to verify passwords. + // + // * ALLOW_USER_SRP_AUTH: Enable SRP based authentication. + // + // * ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens. ExplicitAuthFlows []*string `type:"list"` // Boolean to specify whether you want to generate a secret for the user pool @@ -16441,6 +16495,44 @@ type CreateUserPoolClientInput struct { // A list of allowed logout URLs for the identity providers. LogoutURLs []*string `type:"list"` + // Use this setting to choose which errors and responses are returned by Cognito + // APIs during authentication, account confirmation, and password recovery when + // the user does not exist in the user pool. When set to ENABLED and the user + // does not exist, authentication returns an error indicating either the username + // or password was incorrect, and account confirmation and password recovery + // return a response indicating a code was sent to a simulated destination. + // When set to LEGACY, those APIs will return a UserNotFoundException exception + // if the user does not exist in the user pool. + // + // Valid values include: + // + // * ENABLED - This prevents user existence-related errors. + // + // * LEGACY - This represents the old behavior of Cognito where user existence + // related errors are not prevented. + // + // This setting affects the behavior of following APIs: + // + // * AdminInitiateAuth + // + // * AdminRespondToAuthChallenge + // + // * InitiateAuth + // + // * RespondToAuthChallenge + // + // * ForgotPassword + // + // * ConfirmForgotPassword + // + // * ConfirmSignUp + // + // * ResendConfirmationCode + // + // After January 1st 2020, the value of PreventUserExistenceErrors will default + // to ENABLED for newly created user pool clients if no value is provided. + PreventUserExistenceErrors *string `type:"string" enum:"PreventUserExistenceErrorTypes"` + // The read attributes. ReadAttributes []*string `type:"list"` @@ -16569,6 +16661,12 @@ func (s *CreateUserPoolClientInput) SetLogoutURLs(v []*string) *CreateUserPoolCl return s } +// SetPreventUserExistenceErrors sets the PreventUserExistenceErrors field's value. +func (s *CreateUserPoolClientInput) SetPreventUserExistenceErrors(v string) *CreateUserPoolClientInput { + s.PreventUserExistenceErrors = &v + return s +} + // SetReadAttributes sets the ReadAttributes field's value. func (s *CreateUserPoolClientInput) SetReadAttributes(v []*string) *CreateUserPoolClientInput { s.ReadAttributes = v @@ -19924,6 +20022,11 @@ type InitiateAuthInput struct { // will invoke the user migration Lambda if the USERNAME is not found in // the user pool. // + // * ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. + // This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, + // Cognito receives the password in the request instead of using the SRP + // process to verify passwords. + // // ADMIN_NO_SRP_AUTH is not a valid value. // // AuthFlow is a required field @@ -24480,13 +24583,13 @@ type UpdateUserAttributesInput struct { // // You create custom workflows by assigning AWS Lambda functions to user pool // triggers. When you use the UpdateUserAttributes API action, Amazon Cognito - // invokes the functions that are assigned to the custom message and pre mutation - // triggers. When Amazon Cognito invokes either of these functions, it passes - // a JSON payload, which the function receives as input. This payload contains - // a clientMetadata attribute, which provides the data that you assigned to - // the ClientMetadata parameter in your UpdateUserAttributes request. In your - // function code in AWS Lambda, you can process the clientMetadata value to - // enhance your workflow for your specific needs. + // invokes the function that is assigned to the custom message trigger. When + // Amazon Cognito invokes this function, it passes a JSON payload, which the + // function receives as input. This payload contains a clientMetadata attribute, + // which provides the data that you assigned to the ClientMetadata parameter + // in your UpdateUserAttributes request. In your function code in AWS Lambda, + // you can process the clientMetadata value to enhance your workflow for your + // specific needs. // // For more information, see Customizing User Pool Workflows with Lambda Triggers // (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) @@ -24660,12 +24763,71 @@ type UpdateUserPoolClientInput struct { // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` - // Explicit authentication flows. + // The authentication flows that are supported by the user pool clients. Flow + // names without the ALLOW_ prefix are deprecated in favor of new names with + // the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along + // with values without ALLOW_ prefix. + // + // Valid values include: + // + // * ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication + // flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH + // setting. With this authentication flow, Cognito receives the password + // in the request instead of using the SRP (Secure Remote Password protocol) + // protocol to verify passwords. + // + // * ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication. + // + // * ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. + // In this flow, Cognito receives the password in the request instead of + // using the SRP protocol to verify passwords. + // + // * ALLOW_USER_SRP_AUTH: Enable SRP based authentication. + // + // * ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens. ExplicitAuthFlows []*string `type:"list"` // A list of allowed logout URLs for the identity providers. LogoutURLs []*string `type:"list"` + // Use this setting to choose which errors and responses are returned by Cognito + // APIs during authentication, account confirmation, and password recovery when + // the user does not exist in the user pool. When set to ENABLED and the user + // does not exist, authentication returns an error indicating either the username + // or password was incorrect, and account confirmation and password recovery + // return a response indicating a code was sent to a simulated destination. + // When set to LEGACY, those APIs will return a UserNotFoundException exception + // if the user does not exist in the user pool. + // + // Valid values include: + // + // * ENABLED - This prevents user existence-related errors. + // + // * LEGACY - This represents the old behavior of Cognito where user existence + // related errors are not prevented. + // + // This setting affects the behavior of following APIs: + // + // * AdminInitiateAuth + // + // * AdminRespondToAuthChallenge + // + // * InitiateAuth + // + // * RespondToAuthChallenge + // + // * ForgotPassword + // + // * ConfirmForgotPassword + // + // * ConfirmSignUp + // + // * ResendConfirmationCode + // + // After January 1st 2020, the value of PreventUserExistenceErrors will default + // to ENABLED for newly created user pool clients if no value is provided. + PreventUserExistenceErrors *string `type:"string" enum:"PreventUserExistenceErrorTypes"` + // The read-only attributes of the user pool. ReadAttributes []*string `type:"list"` @@ -24790,6 +24952,12 @@ func (s *UpdateUserPoolClientInput) SetLogoutURLs(v []*string) *UpdateUserPoolCl return s } +// SetPreventUserExistenceErrors sets the PreventUserExistenceErrors field's value. +func (s *UpdateUserPoolClientInput) SetPreventUserExistenceErrors(v string) *UpdateUserPoolClientInput { + s.PreventUserExistenceErrors = &v + return s +} + // SetReadAttributes sets the ReadAttributes field's value. func (s *UpdateUserPoolClientInput) SetReadAttributes(v []*string) *UpdateUserPoolClientInput { s.ReadAttributes = v @@ -25547,7 +25715,28 @@ type UserPoolClientType struct { // App callback URLs such as myapp://example are also supported. DefaultRedirectURI *string `min:"1" type:"string"` - // The explicit authentication flows. + // The authentication flows that are supported by the user pool clients. Flow + // names without the ALLOW_ prefix are deprecated in favor of new names with + // the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along + // with values without ALLOW_ prefix. + // + // Valid values include: + // + // * ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication + // flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH + // setting. With this authentication flow, Cognito receives the password + // in the request instead of using the SRP (Secure Remote Password protocol) + // protocol to verify passwords. + // + // * ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication. + // + // * ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. + // In this flow, Cognito receives the password in the request instead of + // using the SRP protocol to verify passwords. + // + // * ALLOW_USER_SRP_AUTH: Enable SRP based authentication. + // + // * ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens. ExplicitAuthFlows []*string `type:"list"` // The date the user pool client was last modified. @@ -25556,6 +25745,44 @@ type UserPoolClientType struct { // A list of allowed logout URLs for the identity providers. LogoutURLs []*string `type:"list"` + // Use this setting to choose which errors and responses are returned by Cognito + // APIs during authentication, account confirmation, and password recovery when + // the user does not exist in the user pool. When set to ENABLED and the user + // does not exist, authentication returns an error indicating either the username + // or password was incorrect, and account confirmation and password recovery + // return a response indicating a code was sent to a simulated destination. + // When set to LEGACY, those APIs will return a UserNotFoundException exception + // if the user does not exist in the user pool. + // + // Valid values include: + // + // * ENABLED - This prevents user existence-related errors. + // + // * LEGACY - This represents the old behavior of Cognito where user existence + // related errors are not prevented. + // + // This setting affects the behavior of following APIs: + // + // * AdminInitiateAuth + // + // * AdminRespondToAuthChallenge + // + // * InitiateAuth + // + // * RespondToAuthChallenge + // + // * ForgotPassword + // + // * ConfirmForgotPassword + // + // * ConfirmSignUp + // + // * ResendConfirmationCode + // + // After January 1st 2020, the value of PreventUserExistenceErrors will default + // to ENABLED for newly created user pool clients if no value is provided. + PreventUserExistenceErrors *string `type:"string" enum:"PreventUserExistenceErrorTypes"` + // The Read-only attributes. ReadAttributes []*string `type:"list"` @@ -25662,6 +25889,12 @@ func (s *UserPoolClientType) SetLogoutURLs(v []*string) *UserPoolClientType { return s } +// SetPreventUserExistenceErrors sets the PreventUserExistenceErrors field's value. +func (s *UserPoolClientType) SetPreventUserExistenceErrors(v string) *UserPoolClientType { + s.PreventUserExistenceErrors = &v + return s +} + // SetReadAttributes sets the ReadAttributes field's value. func (s *UserPoolClientType) SetReadAttributes(v []*string) *UserPoolClientType { s.ReadAttributes = v @@ -26544,6 +26777,9 @@ const ( // AuthFlowTypeUserPasswordAuth is a AuthFlowType enum value AuthFlowTypeUserPasswordAuth = "USER_PASSWORD_AUTH" + + // AuthFlowTypeAdminUserPasswordAuth is a AuthFlowType enum value + AuthFlowTypeAdminUserPasswordAuth = "ADMIN_USER_PASSWORD_AUTH" ) const ( @@ -26690,6 +26926,21 @@ const ( // ExplicitAuthFlowsTypeUserPasswordAuth is a ExplicitAuthFlowsType enum value ExplicitAuthFlowsTypeUserPasswordAuth = "USER_PASSWORD_AUTH" + + // ExplicitAuthFlowsTypeAllowAdminUserPasswordAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeAllowAdminUserPasswordAuth = "ALLOW_ADMIN_USER_PASSWORD_AUTH" + + // ExplicitAuthFlowsTypeAllowCustomAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeAllowCustomAuth = "ALLOW_CUSTOM_AUTH" + + // ExplicitAuthFlowsTypeAllowUserPasswordAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeAllowUserPasswordAuth = "ALLOW_USER_PASSWORD_AUTH" + + // ExplicitAuthFlowsTypeAllowUserSrpAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeAllowUserSrpAuth = "ALLOW_USER_SRP_AUTH" + + // ExplicitAuthFlowsTypeAllowRefreshTokenAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeAllowRefreshTokenAuth = "ALLOW_REFRESH_TOKEN_AUTH" ) const ( @@ -26736,6 +26987,14 @@ const ( OAuthFlowTypeClientCredentials = "client_credentials" ) +const ( + // PreventUserExistenceErrorTypesLegacy is a PreventUserExistenceErrorTypes enum value + PreventUserExistenceErrorTypesLegacy = "LEGACY" + + // PreventUserExistenceErrorTypesEnabled is a PreventUserExistenceErrorTypes enum value + PreventUserExistenceErrorTypesEnabled = "ENABLED" +) + const ( // RiskDecisionTypeNoRisk is a RiskDecisionType enum value RiskDecisionTypeNoRisk = "NoRisk" 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 f901df62789..8d209237b92 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 @@ -2883,10 +2883,12 @@ func (c *ConfigService) DescribeRemediationExceptionsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRemediationExceptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeRemediationExceptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3025,10 +3027,12 @@ func (c *ConfigService) DescribeRemediationExecutionStatusPagesWithContext(ctx a }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRemediationExecutionStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeRemediationExecutionStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4202,10 +4206,12 @@ func (c *ConfigService) GetResourceConfigHistoryPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceConfigHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourceConfigHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 46efb54c1a5..9ae48a197a0 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 @@ -222,10 +222,12 @@ func (c *CostandUsageReportService) DescribeReportDefinitionsPagesWithContext(ct }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReportDefinitionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReportDefinitionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 d78ce3f7a38..f5682aca71d 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 @@ -1505,10 +1505,12 @@ func (c *DatabaseMigrationService) DescribeCertificatesPagesWithContext(ctx aws. }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1641,10 +1643,12 @@ func (c *DatabaseMigrationService) DescribeConnectionsPagesWithContext(ctx aws.C }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeConnectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeConnectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1771,10 +1775,12 @@ func (c *DatabaseMigrationService) DescribeEndpointTypesPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEndpointTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1906,10 +1912,12 @@ func (c *DatabaseMigrationService) DescribeEndpointsPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2123,10 +2131,12 @@ func (c *DatabaseMigrationService) DescribeEventSubscriptionsPagesWithContext(ct }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2256,10 +2266,12 @@ func (c *DatabaseMigrationService) DescribeEventsPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2387,10 +2399,12 @@ func (c *DatabaseMigrationService) DescribeOrderableReplicationInstancesPagesWit }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableReplicationInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOrderableReplicationInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2522,10 +2536,12 @@ func (c *DatabaseMigrationService) DescribePendingMaintenanceActionsPagesWithCon }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePendingMaintenanceActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePendingMaintenanceActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2744,10 +2760,12 @@ func (c *DatabaseMigrationService) DescribeReplicationInstanceTaskLogsPagesWithC }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationInstanceTaskLogsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationInstanceTaskLogsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2880,10 +2898,12 @@ func (c *DatabaseMigrationService) DescribeReplicationInstancesPagesWithContext( }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3015,10 +3035,12 @@ func (c *DatabaseMigrationService) DescribeReplicationSubnetGroupsPagesWithConte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3151,10 +3173,12 @@ func (c *DatabaseMigrationService) DescribeReplicationTaskAssessmentResultsPages }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationTaskAssessmentResultsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationTaskAssessmentResultsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3287,10 +3311,12 @@ func (c *DatabaseMigrationService) DescribeReplicationTasksPagesWithContext(ctx }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationTasksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationTasksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3426,10 +3452,12 @@ func (c *DatabaseMigrationService) DescribeSchemasPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSchemasOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSchemasOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3570,10 +3598,12 @@ func (c *DatabaseMigrationService) DescribeTableStatisticsPagesWithContext(ctx a }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTableStatisticsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTableStatisticsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 12299e88b4d..d31631d8264 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 @@ -624,10 +624,12 @@ func (c *DataPipeline) DescribeObjectsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeObjectsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeObjectsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1052,10 +1054,12 @@ func (c *DataPipeline) ListPipelinesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1401,10 +1405,12 @@ func (c *DataPipeline) QueryObjectsPagesWithContext(ctx aws.Context, input *Quer }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*QueryObjectsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*QueryObjectsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 f1fa7421bd3..6a97a930fee 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 @@ -1611,10 +1611,12 @@ func (c *DataSync) ListAgentsPagesWithContext(ctx aws.Context, input *ListAgents }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAgentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAgentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1754,10 +1756,12 @@ func (c *DataSync) ListLocationsPagesWithContext(ctx aws.Context, input *ListLoc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLocationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLocationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1892,10 +1896,12 @@ func (c *DataSync) ListTagsForResourcePagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2030,10 +2036,12 @@ func (c *DataSync) ListTaskExecutionsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2168,10 +2176,12 @@ func (c *DataSync) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4c4532e25c3..2f7c56f935d 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 @@ -2201,10 +2201,12 @@ func (c *DeviceFarm) GetOfferingStatusPagesWithContext(ctx aws.Context, input *G }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetOfferingStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetOfferingStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3049,10 +3051,12 @@ func (c *DeviceFarm) ListArtifactsPagesWithContext(ctx aws.Context, input *ListA }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListArtifactsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListArtifactsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3282,10 +3286,12 @@ func (c *DeviceFarm) ListDevicePoolsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicePoolsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDevicePoolsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3426,10 +3432,12 @@ func (c *DeviceFarm) ListDevicesPagesWithContext(ctx aws.Context, input *ListDev }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3658,10 +3666,12 @@ func (c *DeviceFarm) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3995,10 +4005,12 @@ func (c *DeviceFarm) ListOfferingTransactionsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingTransactionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOfferingTransactionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4148,10 +4160,12 @@ func (c *DeviceFarm) ListOfferingsPagesWithContext(ctx aws.Context, input *ListO }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4292,10 +4306,12 @@ func (c *DeviceFarm) ListProjectsPagesWithContext(ctx aws.Context, input *ListPr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProjectsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProjectsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4524,10 +4540,12 @@ func (c *DeviceFarm) ListRunsPagesWithContext(ctx aws.Context, input *ListRunsIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRunsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRunsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4668,10 +4686,12 @@ func (c *DeviceFarm) ListSamplesPagesWithContext(ctx aws.Context, input *ListSam }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSamplesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSamplesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4812,10 +4832,12 @@ func (c *DeviceFarm) ListSuitesPagesWithContext(ctx aws.Context, input *ListSuit }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSuitesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSuitesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5038,10 +5060,12 @@ func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTests }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTestsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTestsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5182,10 +5206,12 @@ func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUniqueProblemsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUniqueProblemsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5326,10 +5352,12 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUploadsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUploadsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 8b62a2664aa..5805c3fd22d 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 @@ -2159,10 +2159,12 @@ func (c *DirectoryService) DescribeDomainControllersPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDomainControllersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDomainControllersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go index a6b0b62f23a..8074f02c7a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go @@ -1902,10 +1902,12 @@ func (c *DocDB) DescribeDBClustersPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2032,10 +2034,12 @@ func (c *DocDB) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2168,10 +2172,12 @@ func (c *DocDB) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *Desc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2304,10 +2310,12 @@ func (c *DocDB) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2588,10 +2596,12 @@ func (c *DocDB) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeE }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2718,10 +2728,12 @@ func (c *DocDB) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 51e419e9492..562870b35d1 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 @@ -229,10 +229,12 @@ func (c *DynamoDB) BatchGetItemPagesWithContext(ctx aws.Context, input *BatchGet }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2687,10 +2689,12 @@ func (c *DynamoDB) ListTablesPagesWithContext(ctx aws.Context, input *ListTables }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3185,10 +3189,12 @@ func (c *DynamoDB) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*QueryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*QueryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3695,10 +3701,12 @@ func (c *DynamoDB) ScanPagesWithContext(ctx aws.Context, input *ScanInput, fn fu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ScanOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ScanOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 17131a9bd30..29e19cb10ab 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 @@ -11346,10 +11346,12 @@ func (c *EC2) DescribeByoipCidrsPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeByoipCidrsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeByoipCidrsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11477,10 +11479,12 @@ func (c *EC2) DescribeCapacityReservationsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCapacityReservationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCapacityReservationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11610,10 +11614,12 @@ func (c *EC2) DescribeClassicLinkInstancesPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClassicLinkInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClassicLinkInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11740,10 +11746,12 @@ func (c *EC2) DescribeClientVpnAuthorizationRulesPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClientVpnAuthorizationRulesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClientVpnAuthorizationRulesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11871,10 +11879,12 @@ func (c *EC2) DescribeClientVpnConnectionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClientVpnConnectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClientVpnConnectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12001,10 +12011,12 @@ func (c *EC2) DescribeClientVpnEndpointsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClientVpnEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClientVpnEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12131,10 +12143,12 @@ func (c *EC2) DescribeClientVpnRoutesPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClientVpnRoutesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClientVpnRoutesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12261,10 +12275,12 @@ func (c *EC2) DescribeClientVpnTargetNetworksPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClientVpnTargetNetworksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClientVpnTargetNetworksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12549,10 +12565,12 @@ func (c *EC2) DescribeDhcpOptionsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDhcpOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDhcpOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12679,10 +12697,12 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEgressOnlyInternetGatewaysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEgressOnlyInternetGatewaysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13182,10 +13202,12 @@ func (c *EC2) DescribeFleetsPagesWithContext(ctx aws.Context, input *DescribeFle }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeFleetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeFleetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13314,10 +13336,12 @@ func (c *EC2) DescribeFlowLogsPagesWithContext(ctx aws.Context, input *DescribeF }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeFlowLogsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeFlowLogsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13520,10 +13544,12 @@ func (c *EC2) DescribeFpgaImagesPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeFpgaImagesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeFpgaImagesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13658,10 +13684,12 @@ func (c *EC2) DescribeHostReservationOfferingsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHostReservationOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeHostReservationOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13788,10 +13816,12 @@ func (c *EC2) DescribeHostReservationsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHostReservationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeHostReservationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13922,10 +13952,12 @@ func (c *EC2) DescribeHostsPagesWithContext(ctx aws.Context, input *DescribeHost }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHostsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeHostsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -14052,10 +14084,12 @@ func (c *EC2) DescribeIamInstanceProfileAssociationsPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeIamInstanceProfileAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeIamInstanceProfileAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -14524,10 +14558,12 @@ func (c *EC2) DescribeImportImageTasksPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImportImageTasksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImportImageTasksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -14654,10 +14690,12 @@ func (c *EC2) DescribeImportSnapshotTasksPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImportSnapshotTasksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImportSnapshotTasksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -14885,10 +14923,12 @@ func (c *EC2) DescribeInstanceCreditSpecificationsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstanceCreditSpecificationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInstanceCreditSpecificationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15036,10 +15076,12 @@ func (c *EC2) DescribeInstanceStatusPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstanceStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInstanceStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15181,10 +15223,12 @@ func (c *EC2) DescribeInstancesPagesWithContext(ctx aws.Context, input *Describe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15311,10 +15355,12 @@ func (c *EC2) DescribeInternetGatewaysPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInternetGatewaysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInternetGatewaysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15519,10 +15565,12 @@ func (c *EC2) DescribeLaunchTemplateVersionsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLaunchTemplateVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLaunchTemplateVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15649,10 +15697,12 @@ func (c *EC2) DescribeLaunchTemplatesPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLaunchTemplatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLaunchTemplatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15781,10 +15831,12 @@ func (c *EC2) DescribeMovingAddressesPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeMovingAddressesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeMovingAddressesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -15911,10 +15963,12 @@ func (c *EC2) DescribeNatGatewaysPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNatGatewaysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNatGatewaysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16044,10 +16098,12 @@ func (c *EC2) DescribeNetworkAclsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNetworkAclsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNetworkAclsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16249,10 +16305,12 @@ func (c *EC2) DescribeNetworkInterfacePermissionsPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNetworkInterfacePermissionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNetworkInterfacePermissionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16379,10 +16437,12 @@ func (c *EC2) DescribeNetworkInterfacesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNetworkInterfacesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNetworkInterfacesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16590,10 +16650,12 @@ func (c *EC2) DescribePrefixListsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePrefixListsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePrefixListsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16734,10 +16796,12 @@ func (c *EC2) DescribePrincipalIdFormatPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePrincipalIdFormatOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePrincipalIdFormatOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -16864,10 +16928,12 @@ func (c *EC2) DescribePublicIpv4PoolsPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribePublicIpv4PoolsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribePublicIpv4PoolsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -17253,10 +17319,12 @@ func (c *EC2) DescribeReservedInstancesModificationsPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedInstancesModificationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedInstancesModificationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -17394,10 +17462,12 @@ func (c *EC2) DescribeReservedInstancesOfferingsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedInstancesOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedInstancesOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -17532,10 +17602,12 @@ func (c *EC2) DescribeRouteTablesPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRouteTablesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeRouteTablesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -17670,10 +17742,12 @@ func (c *EC2) DescribeScheduledInstanceAvailabilityPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduledInstanceAvailabilityOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScheduledInstanceAvailabilityOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -17800,10 +17874,12 @@ func (c *EC2) DescribeScheduledInstancesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduledInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScheduledInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -18012,10 +18088,12 @@ func (c *EC2) DescribeSecurityGroupsPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -18267,10 +18345,12 @@ func (c *EC2) DescribeSnapshotsPagesWithContext(ctx aws.Context, input *Describe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -18629,10 +18709,12 @@ func (c *EC2) DescribeSpotFleetRequestsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSpotFleetRequestsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSpotFleetRequestsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -18775,10 +18857,12 @@ func (c *EC2) DescribeSpotInstanceRequestsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSpotInstanceRequestsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSpotInstanceRequestsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -18912,10 +18996,12 @@ func (c *EC2) DescribeSpotPriceHistoryPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSpotPriceHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSpotPriceHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19045,10 +19131,12 @@ func (c *EC2) DescribeStaleSecurityGroupsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStaleSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeStaleSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19178,10 +19266,12 @@ func (c *EC2) DescribeSubnetsPagesWithContext(ctx aws.Context, input *DescribeSu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSubnetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSubnetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19311,10 +19401,12 @@ func (c *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19441,10 +19533,12 @@ func (c *EC2) DescribeTrafficMirrorFiltersPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTrafficMirrorFiltersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTrafficMirrorFiltersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19572,10 +19666,12 @@ func (c *EC2) DescribeTrafficMirrorSessionsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTrafficMirrorSessionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTrafficMirrorSessionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19702,10 +19798,12 @@ func (c *EC2) DescribeTrafficMirrorTargetsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTrafficMirrorTargetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTrafficMirrorTargetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19835,10 +19933,12 @@ func (c *EC2) DescribeTransitGatewayAttachmentsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTransitGatewayAttachmentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayAttachmentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -19966,10 +20066,12 @@ func (c *EC2) DescribeTransitGatewayRouteTablesPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTransitGatewayRouteTablesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayRouteTablesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -20097,10 +20199,12 @@ func (c *EC2) DescribeTransitGatewayVpcAttachmentsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTransitGatewayVpcAttachmentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayVpcAttachmentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -20228,10 +20332,12 @@ func (c *EC2) DescribeTransitGatewaysPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTransitGatewaysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewaysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -20471,10 +20577,12 @@ func (c *EC2) DescribeVolumeStatusPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVolumeStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVolumeStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -20611,10 +20719,12 @@ func (c *EC2) DescribeVolumesPagesWithContext(ctx aws.Context, input *DescribeVo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVolumesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVolumesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -20754,10 +20864,12 @@ func (c *EC2) DescribeVolumesModificationsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVolumesModificationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVolumesModificationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21039,10 +21151,12 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcClassicLinkDnsSupportOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcClassicLinkDnsSupportOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21170,10 +21284,12 @@ func (c *EC2) DescribeVpcEndpointConnectionNotificationsPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcEndpointConnectionNotificationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcEndpointConnectionNotificationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21301,10 +21417,12 @@ func (c *EC2) DescribeVpcEndpointConnectionsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcEndpointConnectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcEndpointConnectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21431,10 +21549,12 @@ func (c *EC2) DescribeVpcEndpointServiceConfigurationsPagesWithContext(ctx aws.C }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcEndpointServiceConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcEndpointServiceConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21562,10 +21682,12 @@ func (c *EC2) DescribeVpcEndpointServicePermissionsPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcEndpointServicePermissionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcEndpointServicePermissionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21766,10 +21888,12 @@ func (c *EC2) DescribeVpcEndpointsPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -21896,10 +22020,12 @@ func (c *EC2) DescribeVpcPeeringConnectionsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcPeeringConnectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcPeeringConnectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -22026,10 +22152,12 @@ func (c *EC2) DescribeVpcsPagesWithContext(ctx aws.Context, input *DescribeVpcsI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVpcsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVpcsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -25152,10 +25280,12 @@ func (c *EC2) GetTransitGatewayAttachmentPropagationsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTransitGatewayAttachmentPropagationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTransitGatewayAttachmentPropagationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -25283,10 +25413,12 @@ func (c *EC2) GetTransitGatewayRouteTableAssociationsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTransitGatewayRouteTableAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTransitGatewayRouteTableAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -25414,10 +25546,12 @@ func (c *EC2) GetTransitGatewayRouteTablePropagationsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTransitGatewayRouteTablePropagationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTransitGatewayRouteTablePropagationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 f66d4f001f1..83be08f0f77 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 @@ -918,10 +918,12 @@ func (c *ECR) DescribeImageScanFindingsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImageScanFindingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImageScanFindingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1070,10 +1072,12 @@ func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeIma }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1213,10 +1217,12 @@ func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1639,10 +1645,12 @@ func (c *ECR) GetLifecyclePolicyPreviewPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetLifecyclePolicyPreviewOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetLifecyclePolicyPreviewOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1970,10 +1978,12 @@ func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListImagesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 ac78be2b524..384737bcf2a 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 @@ -2120,10 +2120,12 @@ func (c *ECS) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2272,10 +2274,12 @@ func (c *ECS) ListContainerInstancesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListContainerInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListContainerInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2420,10 +2424,12 @@ func (c *ECS) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2662,10 +2668,12 @@ func (c *ECS) ListTaskDefinitionFamiliesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskDefinitionFamiliesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTaskDefinitionFamiliesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2808,10 +2816,12 @@ func (c *ECS) ListTaskDefinitionsPagesWithContext(ctx aws.Context, input *ListTa }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTaskDefinitionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTaskDefinitionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2965,10 +2975,12 @@ func (c *ECS) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 bf3bea5d7db..28140fc874e 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 @@ -591,10 +591,12 @@ func (c *EKS) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -824,10 +826,12 @@ func (c *EKS) ListUpdatesPagesWithContext(ctx aws.Context, input *ListUpdatesInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUpdatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUpdatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 0d26e58152b..d72e03e5ed4 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 @@ -2185,10 +2185,12 @@ func (c *ElastiCache) DescribeCacheClustersPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2315,10 +2317,12 @@ func (c *ElastiCache) DescribeCacheEngineVersionsPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheEngineVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheEngineVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2459,10 +2463,12 @@ func (c *ElastiCache) DescribeCacheParameterGroupsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheParameterGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheParameterGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2601,10 +2607,12 @@ func (c *ElastiCache) DescribeCacheParametersPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2745,10 +2753,12 @@ func (c *ElastiCache) DescribeCacheSecurityGroupsPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2884,10 +2894,12 @@ func (c *ElastiCache) DescribeCacheSubnetGroupsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCacheSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCacheSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3023,10 +3035,12 @@ func (c *ElastiCache) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3166,10 +3180,12 @@ func (c *ElastiCache) DescribeEventsPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3311,10 +3327,12 @@ func (c *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReplicationGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReplicationGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3453,10 +3471,12 @@ func (c *ElastiCache) DescribeReservedCacheNodesPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedCacheNodesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedCacheNodesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3594,10 +3614,12 @@ func (c *ElastiCache) DescribeReservedCacheNodesOfferingsPagesWithContext(ctx aw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedCacheNodesOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedCacheNodesOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3735,10 +3757,12 @@ func (c *ElastiCache) DescribeServiceUpdatesPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeServiceUpdatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeServiceUpdatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3884,10 +3908,12 @@ func (c *ElastiCache) DescribeSnapshotsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4022,10 +4048,12 @@ func (c *ElastiCache) DescribeUpdateActionsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeUpdateActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeUpdateActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 54f81ba8ee2..2e91780c444 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 @@ -2269,10 +2269,12 @@ func (c *ElasticBeanstalk) DescribeEventsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 d454c11d587..5208c41a15f 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 @@ -984,10 +984,12 @@ func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPag }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedElasticsearchInstanceOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedElasticsearchInstanceOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1130,10 +1132,12 @@ func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithCo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedElasticsearchInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedElasticsearchInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1375,10 +1379,12 @@ func (c *ElasticsearchService) GetUpgradeHistoryPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUpgradeHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetUpgradeHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1695,10 +1701,12 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ct }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListElasticsearchInstanceTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListElasticsearchInstanceTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1840,10 +1848,12 @@ func (c *ElasticsearchService) ListElasticsearchVersionsPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListElasticsearchVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListElasticsearchVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b3e2d0df675..49363f1934f 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 @@ -743,10 +743,12 @@ func (c *ElasticTranscoder) ListJobsByPipelinePagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsByPipelineOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsByPipelineOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -891,10 +893,12 @@ func (c *ElasticTranscoder) ListJobsByStatusPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsByStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsByStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1033,10 +1037,12 @@ func (c *ElasticTranscoder) ListPipelinesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1175,10 +1181,12 @@ func (c *ElasticTranscoder) ListPresetsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index acd696d4d6f..c2e93fa72d3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -1807,10 +1807,12 @@ func (c *ELB) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *Desc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index 5da1567a3f2..72ed9cd050b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -1446,10 +1446,12 @@ func (c *ELBV2) DescribeListenersPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeListenersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeListenersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1668,10 +1670,12 @@ func (c *ELBV2) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2153,10 +2157,12 @@ func (c *ELBV2) DescribeTargetGroupsPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTargetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTargetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 ce35d389aee..d966767a739 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 @@ -1190,10 +1190,12 @@ func (c *EMR) ListBootstrapActionsPagesWithContext(ctx aws.Context, input *ListB }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBootstrapActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBootstrapActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1332,10 +1334,12 @@ func (c *EMR) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1473,10 +1477,12 @@ func (c *EMR) ListInstanceFleetsPagesWithContext(ctx aws.Context, input *ListIns }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceFleetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstanceFleetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1611,10 +1617,12 @@ func (c *EMR) ListInstanceGroupsPagesWithContext(ctx aws.Context, input *ListIns }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstanceGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1752,10 +1760,12 @@ func (c *EMR) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstance }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1893,10 +1903,12 @@ func (c *EMR) ListSecurityConfigurationsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSecurityConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSecurityConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2032,10 +2044,12 @@ func (c *EMR) ListStepsPagesWithContext(ctx aws.Context, input *ListStepsInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStepsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStepsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b9853b452b0..400e17a7f72 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 @@ -963,10 +963,12 @@ func (c *FMS) ListComplianceStatusPagesWithContext(ctx aws.Context, input *ListC }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListComplianceStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListComplianceStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1106,10 +1108,12 @@ func (c *FMS) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMem }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1256,10 +1260,12 @@ func (c *FMS) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 cf80363ee33..1321d9b9ab3 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 @@ -2060,10 +2060,12 @@ func (c *ForecastService) ListDatasetGroupsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2203,10 +2205,12 @@ func (c *ForecastService) ListDatasetImportJobsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetImportJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetImportJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2341,10 +2345,12 @@ func (c *ForecastService) ListDatasetsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2484,10 +2490,12 @@ func (c *ForecastService) ListForecastExportJobsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListForecastExportJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListForecastExportJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2627,10 +2635,12 @@ func (c *ForecastService) ListForecastsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListForecastsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListForecastsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2770,10 +2780,12 @@ func (c *ForecastService) ListPredictorsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPredictorsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPredictorsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 a4a75ea94d0..99bc03c8f12 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 @@ -790,10 +790,12 @@ func (c *FSx) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBa }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -954,10 +956,12 @@ func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4e54a116d59..fc7c251dad6 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 @@ -2300,10 +2300,12 @@ func (c *Glacier) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2471,10 +2473,12 @@ func (c *Glacier) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2636,10 +2640,12 @@ func (c *Glacier) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2969,10 +2975,12 @@ func (c *Glacier) ListVaultsPagesWithContext(ctx aws.Context, input *ListVaultsI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVaultsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVaultsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 671905672c3..a35163defca 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 @@ -4151,10 +4151,12 @@ func (c *Glue) GetClassifiersPagesWithContext(ctx aws.Context, input *GetClassif }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetClassifiersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetClassifiersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4383,10 +4385,12 @@ func (c *Glue) GetConnectionsPagesWithContext(ctx aws.Context, input *GetConnect }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetConnectionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetConnectionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4600,10 +4604,12 @@ func (c *Glue) GetCrawlerMetricsPagesWithContext(ctx aws.Context, input *GetCraw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCrawlerMetricsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetCrawlerMetricsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4735,10 +4741,12 @@ func (c *Glue) GetCrawlersPagesWithContext(ctx aws.Context, input *GetCrawlersIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetCrawlersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetCrawlersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5055,10 +5063,12 @@ func (c *Glue) GetDatabasesPagesWithContext(ctx aws.Context, input *GetDatabases }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDatabasesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetDatabasesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5382,10 +5392,12 @@ func (c *Glue) GetDevEndpointsPagesWithContext(ctx aws.Context, input *GetDevEnd }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetDevEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetDevEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5793,10 +5805,12 @@ func (c *Glue) GetJobRunsPagesWithContext(ctx aws.Context, input *GetJobRunsInpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetJobRunsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetJobRunsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5937,10 +5951,12 @@ func (c *Glue) GetJobsPagesWithContext(ctx aws.Context, input *GetJobsInput, fn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6180,10 +6196,12 @@ func (c *Glue) GetMLTaskRunsPagesWithContext(ctx aws.Context, input *GetMLTaskRu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetMLTaskRunsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetMLTaskRunsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6420,10 +6438,12 @@ func (c *Glue) GetMLTransformsPagesWithContext(ctx aws.Context, input *GetMLTran }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetMLTransformsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetMLTransformsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6746,10 +6766,12 @@ func (c *Glue) GetPartitionsPagesWithContext(ctx aws.Context, input *GetPartitio }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetPartitionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetPartitionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7151,10 +7173,12 @@ func (c *Glue) GetSecurityConfigurationsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSecurityConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetSecurityConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7481,10 +7505,12 @@ func (c *Glue) GetTableVersionsPagesWithContext(ctx aws.Context, input *GetTable }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTableVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTableVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7628,10 +7654,12 @@ func (c *Glue) GetTablesPagesWithContext(ctx aws.Context, input *GetTablesInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTablesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTablesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7948,10 +7976,12 @@ func (c *Glue) GetTriggersPagesWithContext(ctx aws.Context, input *GetTriggersIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTriggersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTriggersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8186,10 +8216,12 @@ func (c *Glue) GetUserDefinedFunctionsPagesWithContext(ctx aws.Context, input *G }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetUserDefinedFunctionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetUserDefinedFunctionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8594,10 +8626,12 @@ func (c *Glue) GetWorkflowRunsPagesWithContext(ctx aws.Context, input *GetWorkfl }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetWorkflowRunsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetWorkflowRunsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8818,10 +8852,12 @@ func (c *Glue) ListCrawlersPagesWithContext(ctx aws.Context, input *ListCrawlers }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCrawlersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCrawlersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8968,10 +9004,12 @@ func (c *Glue) ListDevEndpointsPagesWithContext(ctx aws.Context, input *ListDevE }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDevEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9118,10 +9156,12 @@ func (c *Glue) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, f }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9268,10 +9308,12 @@ func (c *Glue) ListTriggersPagesWithContext(ctx aws.Context, input *ListTriggers }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTriggersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTriggersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9409,10 +9451,12 @@ func (c *Glue) ListWorkflowsPagesWithContext(ctx aws.Context, input *ListWorkflo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkflowsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWorkflowsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9926,10 +9970,12 @@ func (c *Glue) SearchTablesPagesWithContext(ctx aws.Context, input *SearchTables }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchTablesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchTablesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 new file mode 100644 index 00000000000..2ef8296ae56 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/greengrass/api.go @@ -0,0 +1,17604 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package greengrass + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opAssociateRoleToGroup = "AssociateRoleToGroup" + +// AssociateRoleToGroupRequest generates a "aws/request.Request" representing the +// client's request for the AssociateRoleToGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateRoleToGroup for more information on using the AssociateRoleToGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateRoleToGroupRequest method. +// req, resp := client.AssociateRoleToGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateRoleToGroup +func (c *Greengrass) AssociateRoleToGroupRequest(input *AssociateRoleToGroupInput) (req *request.Request, output *AssociateRoleToGroupOutput) { + op := &request.Operation{ + Name: opAssociateRoleToGroup, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/groups/{GroupId}/role", + } + + if input == nil { + input = &AssociateRoleToGroupInput{} + } + + output = &AssociateRoleToGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateRoleToGroup API operation for AWS Greengrass. +// +// Associates a role with a group. Your Greengrass core will use the role to +// access AWS cloud services. The role's permissions should allow Greengrass +// core Lambda functions to perform actions against the cloud. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation AssociateRoleToGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateRoleToGroup +func (c *Greengrass) AssociateRoleToGroup(input *AssociateRoleToGroupInput) (*AssociateRoleToGroupOutput, error) { + req, out := c.AssociateRoleToGroupRequest(input) + return out, req.Send() +} + +// AssociateRoleToGroupWithContext is the same as AssociateRoleToGroup with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateRoleToGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) AssociateRoleToGroupWithContext(ctx aws.Context, input *AssociateRoleToGroupInput, opts ...request.Option) (*AssociateRoleToGroupOutput, error) { + req, out := c.AssociateRoleToGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateServiceRoleToAccount = "AssociateServiceRoleToAccount" + +// AssociateServiceRoleToAccountRequest generates a "aws/request.Request" representing the +// client's request for the AssociateServiceRoleToAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateServiceRoleToAccount for more information on using the AssociateServiceRoleToAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateServiceRoleToAccountRequest method. +// req, resp := client.AssociateServiceRoleToAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateServiceRoleToAccount +func (c *Greengrass) AssociateServiceRoleToAccountRequest(input *AssociateServiceRoleToAccountInput) (req *request.Request, output *AssociateServiceRoleToAccountOutput) { + op := &request.Operation{ + Name: opAssociateServiceRoleToAccount, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/servicerole", + } + + if input == nil { + input = &AssociateServiceRoleToAccountInput{} + } + + output = &AssociateServiceRoleToAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateServiceRoleToAccount API operation for AWS Greengrass. +// +// Associates a role with your account. AWS IoT Greengrass will use the role +// to access your Lambda functions and AWS IoT resources. This is necessary +// for deployments to succeed. The role must have at least minimum permissions +// in the policy ''AWSGreengrassResourceAccessRolePolicy''. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation AssociateServiceRoleToAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateServiceRoleToAccount +func (c *Greengrass) AssociateServiceRoleToAccount(input *AssociateServiceRoleToAccountInput) (*AssociateServiceRoleToAccountOutput, error) { + req, out := c.AssociateServiceRoleToAccountRequest(input) + return out, req.Send() +} + +// AssociateServiceRoleToAccountWithContext is the same as AssociateServiceRoleToAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateServiceRoleToAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) AssociateServiceRoleToAccountWithContext(ctx aws.Context, input *AssociateServiceRoleToAccountInput, opts ...request.Option) (*AssociateServiceRoleToAccountOutput, error) { + req, out := c.AssociateServiceRoleToAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateConnectorDefinition = "CreateConnectorDefinition" + +// CreateConnectorDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateConnectorDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConnectorDefinition for more information on using the CreateConnectorDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConnectorDefinitionRequest method. +// req, resp := client.CreateConnectorDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateConnectorDefinition +func (c *Greengrass) CreateConnectorDefinitionRequest(input *CreateConnectorDefinitionInput) (req *request.Request, output *CreateConnectorDefinitionOutput) { + op := &request.Operation{ + Name: opCreateConnectorDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/connectors", + } + + if input == nil { + input = &CreateConnectorDefinitionInput{} + } + + output = &CreateConnectorDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateConnectorDefinition API operation for AWS Greengrass. +// +// Creates a connector definition. You may provide the initial version of the +// connector definition now or use ''CreateConnectorDefinitionVersion'' at a +// later 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 AWS Greengrass's +// API operation CreateConnectorDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateConnectorDefinition +func (c *Greengrass) CreateConnectorDefinition(input *CreateConnectorDefinitionInput) (*CreateConnectorDefinitionOutput, error) { + req, out := c.CreateConnectorDefinitionRequest(input) + return out, req.Send() +} + +// CreateConnectorDefinitionWithContext is the same as CreateConnectorDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConnectorDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateConnectorDefinitionWithContext(ctx aws.Context, input *CreateConnectorDefinitionInput, opts ...request.Option) (*CreateConnectorDefinitionOutput, error) { + req, out := c.CreateConnectorDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateConnectorDefinitionVersion = "CreateConnectorDefinitionVersion" + +// CreateConnectorDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateConnectorDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConnectorDefinitionVersion for more information on using the CreateConnectorDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConnectorDefinitionVersionRequest method. +// req, resp := client.CreateConnectorDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateConnectorDefinitionVersion +func (c *Greengrass) CreateConnectorDefinitionVersionRequest(input *CreateConnectorDefinitionVersionInput) (req *request.Request, output *CreateConnectorDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateConnectorDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}/versions", + } + + if input == nil { + input = &CreateConnectorDefinitionVersionInput{} + } + + output = &CreateConnectorDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateConnectorDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a connector definition which has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateConnectorDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateConnectorDefinitionVersion +func (c *Greengrass) CreateConnectorDefinitionVersion(input *CreateConnectorDefinitionVersionInput) (*CreateConnectorDefinitionVersionOutput, error) { + req, out := c.CreateConnectorDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateConnectorDefinitionVersionWithContext is the same as CreateConnectorDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConnectorDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateConnectorDefinitionVersionWithContext(ctx aws.Context, input *CreateConnectorDefinitionVersionInput, opts ...request.Option) (*CreateConnectorDefinitionVersionOutput, error) { + req, out := c.CreateConnectorDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCoreDefinition = "CreateCoreDefinition" + +// CreateCoreDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateCoreDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCoreDefinition for more information on using the CreateCoreDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCoreDefinitionRequest method. +// req, resp := client.CreateCoreDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinition +func (c *Greengrass) CreateCoreDefinitionRequest(input *CreateCoreDefinitionInput) (req *request.Request, output *CreateCoreDefinitionOutput) { + op := &request.Operation{ + Name: opCreateCoreDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/cores", + } + + if input == nil { + input = &CreateCoreDefinitionInput{} + } + + output = &CreateCoreDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCoreDefinition API operation for AWS Greengrass. +// +// Creates a core definition. You may provide the initial version of the core +// definition now or use ''CreateCoreDefinitionVersion'' at a later time. Greengrass +// groups must each contain exactly one Greengrass core. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateCoreDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinition +func (c *Greengrass) CreateCoreDefinition(input *CreateCoreDefinitionInput) (*CreateCoreDefinitionOutput, error) { + req, out := c.CreateCoreDefinitionRequest(input) + return out, req.Send() +} + +// CreateCoreDefinitionWithContext is the same as CreateCoreDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCoreDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateCoreDefinitionWithContext(ctx aws.Context, input *CreateCoreDefinitionInput, opts ...request.Option) (*CreateCoreDefinitionOutput, error) { + req, out := c.CreateCoreDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCoreDefinitionVersion = "CreateCoreDefinitionVersion" + +// CreateCoreDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateCoreDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCoreDefinitionVersion for more information on using the CreateCoreDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCoreDefinitionVersionRequest method. +// req, resp := client.CreateCoreDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionVersion +func (c *Greengrass) CreateCoreDefinitionVersionRequest(input *CreateCoreDefinitionVersionInput) (req *request.Request, output *CreateCoreDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateCoreDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}/versions", + } + + if input == nil { + input = &CreateCoreDefinitionVersionInput{} + } + + output = &CreateCoreDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCoreDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a core definition that has already been defined. Greengrass +// groups must each contain exactly one Greengrass core. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateCoreDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionVersion +func (c *Greengrass) CreateCoreDefinitionVersion(input *CreateCoreDefinitionVersionInput) (*CreateCoreDefinitionVersionOutput, error) { + req, out := c.CreateCoreDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateCoreDefinitionVersionWithContext is the same as CreateCoreDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCoreDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateCoreDefinitionVersionWithContext(ctx aws.Context, input *CreateCoreDefinitionVersionInput, opts ...request.Option) (*CreateCoreDefinitionVersionOutput, error) { + req, out := c.CreateCoreDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDeployment = "CreateDeployment" + +// CreateDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the CreateDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDeployment for more information on using the CreateDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDeploymentRequest method. +// req, resp := client.CreateDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeployment +func (c *Greengrass) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *CreateDeploymentOutput) { + op := &request.Operation{ + Name: opCreateDeployment, + HTTPMethod: "POST", + HTTPPath: "/greengrass/groups/{GroupId}/deployments", + } + + if input == nil { + input = &CreateDeploymentInput{} + } + + output = &CreateDeploymentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDeployment API operation for AWS Greengrass. +// +// Creates a deployment. ''CreateDeployment'' requests are idempotent with respect +// to the ''X-Amzn-Client-Token'' token and the request 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 AWS Greengrass's +// API operation CreateDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeployment +func (c *Greengrass) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { + req, out := c.CreateDeploymentRequest(input) + return out, req.Send() +} + +// CreateDeploymentWithContext is the same as CreateDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateDeploymentWithContext(ctx aws.Context, input *CreateDeploymentInput, opts ...request.Option) (*CreateDeploymentOutput, error) { + req, out := c.CreateDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDeviceDefinition = "CreateDeviceDefinition" + +// CreateDeviceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateDeviceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDeviceDefinition for more information on using the CreateDeviceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDeviceDefinitionRequest method. +// req, resp := client.CreateDeviceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinition +func (c *Greengrass) CreateDeviceDefinitionRequest(input *CreateDeviceDefinitionInput) (req *request.Request, output *CreateDeviceDefinitionOutput) { + op := &request.Operation{ + Name: opCreateDeviceDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/devices", + } + + if input == nil { + input = &CreateDeviceDefinitionInput{} + } + + output = &CreateDeviceDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDeviceDefinition API operation for AWS Greengrass. +// +// Creates a device definition. You may provide the initial version of the device +// definition now or use ''CreateDeviceDefinitionVersion'' at a later 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 AWS Greengrass's +// API operation CreateDeviceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinition +func (c *Greengrass) CreateDeviceDefinition(input *CreateDeviceDefinitionInput) (*CreateDeviceDefinitionOutput, error) { + req, out := c.CreateDeviceDefinitionRequest(input) + return out, req.Send() +} + +// CreateDeviceDefinitionWithContext is the same as CreateDeviceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDeviceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateDeviceDefinitionWithContext(ctx aws.Context, input *CreateDeviceDefinitionInput, opts ...request.Option) (*CreateDeviceDefinitionOutput, error) { + req, out := c.CreateDeviceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDeviceDefinitionVersion = "CreateDeviceDefinitionVersion" + +// CreateDeviceDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateDeviceDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDeviceDefinitionVersion for more information on using the CreateDeviceDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDeviceDefinitionVersionRequest method. +// req, resp := client.CreateDeviceDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionVersion +func (c *Greengrass) CreateDeviceDefinitionVersionRequest(input *CreateDeviceDefinitionVersionInput) (req *request.Request, output *CreateDeviceDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateDeviceDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}/versions", + } + + if input == nil { + input = &CreateDeviceDefinitionVersionInput{} + } + + output = &CreateDeviceDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDeviceDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a device definition that has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateDeviceDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionVersion +func (c *Greengrass) CreateDeviceDefinitionVersion(input *CreateDeviceDefinitionVersionInput) (*CreateDeviceDefinitionVersionOutput, error) { + req, out := c.CreateDeviceDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateDeviceDefinitionVersionWithContext is the same as CreateDeviceDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDeviceDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateDeviceDefinitionVersionWithContext(ctx aws.Context, input *CreateDeviceDefinitionVersionInput, opts ...request.Option) (*CreateDeviceDefinitionVersionOutput, error) { + req, out := c.CreateDeviceDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFunctionDefinition = "CreateFunctionDefinition" + +// CreateFunctionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateFunctionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFunctionDefinition for more information on using the CreateFunctionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFunctionDefinitionRequest method. +// req, resp := client.CreateFunctionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinition +func (c *Greengrass) CreateFunctionDefinitionRequest(input *CreateFunctionDefinitionInput) (req *request.Request, output *CreateFunctionDefinitionOutput) { + op := &request.Operation{ + Name: opCreateFunctionDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/functions", + } + + if input == nil { + input = &CreateFunctionDefinitionInput{} + } + + output = &CreateFunctionDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFunctionDefinition API operation for AWS Greengrass. +// +// Creates a Lambda function definition which contains a list of Lambda functions +// and their configurations to be used in a group. You can create an initial +// version of the definition by providing a list of Lambda functions and their +// configurations now, or use ''CreateFunctionDefinitionVersion'' later. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateFunctionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinition +func (c *Greengrass) CreateFunctionDefinition(input *CreateFunctionDefinitionInput) (*CreateFunctionDefinitionOutput, error) { + req, out := c.CreateFunctionDefinitionRequest(input) + return out, req.Send() +} + +// CreateFunctionDefinitionWithContext is the same as CreateFunctionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFunctionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateFunctionDefinitionWithContext(ctx aws.Context, input *CreateFunctionDefinitionInput, opts ...request.Option) (*CreateFunctionDefinitionOutput, error) { + req, out := c.CreateFunctionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFunctionDefinitionVersion = "CreateFunctionDefinitionVersion" + +// CreateFunctionDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateFunctionDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFunctionDefinitionVersion for more information on using the CreateFunctionDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFunctionDefinitionVersionRequest method. +// req, resp := client.CreateFunctionDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionVersion +func (c *Greengrass) CreateFunctionDefinitionVersionRequest(input *CreateFunctionDefinitionVersionInput) (req *request.Request, output *CreateFunctionDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateFunctionDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}/versions", + } + + if input == nil { + input = &CreateFunctionDefinitionVersionInput{} + } + + output = &CreateFunctionDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFunctionDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a Lambda function definition that has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateFunctionDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionVersion +func (c *Greengrass) CreateFunctionDefinitionVersion(input *CreateFunctionDefinitionVersionInput) (*CreateFunctionDefinitionVersionOutput, error) { + req, out := c.CreateFunctionDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateFunctionDefinitionVersionWithContext is the same as CreateFunctionDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFunctionDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateFunctionDefinitionVersionWithContext(ctx aws.Context, input *CreateFunctionDefinitionVersionInput, opts ...request.Option) (*CreateFunctionDefinitionVersionOutput, error) { + req, out := c.CreateFunctionDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateGroup = "CreateGroup" + +// CreateGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGroup for more information on using the CreateGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGroupRequest method. +// req, resp := client.CreateGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroup +func (c *Greengrass) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { + op := &request.Operation{ + Name: opCreateGroup, + HTTPMethod: "POST", + HTTPPath: "/greengrass/groups", + } + + if input == nil { + input = &CreateGroupInput{} + } + + output = &CreateGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGroup API operation for AWS Greengrass. +// +// Creates a group. You may provide the initial version of the group or use +// ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' +// package (https://github.com/awslabs/aws-greengrass-group-setup) as a library +// or command-line application to create and deploy Greengrass groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroup +func (c *Greengrass) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + return out, req.Send() +} + +// CreateGroupWithContext is the same as CreateGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateGroupCertificateAuthority = "CreateGroupCertificateAuthority" + +// CreateGroupCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the CreateGroupCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGroupCertificateAuthority for more information on using the CreateGroupCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGroupCertificateAuthorityRequest method. +// req, resp := client.CreateGroupCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupCertificateAuthority +func (c *Greengrass) CreateGroupCertificateAuthorityRequest(input *CreateGroupCertificateAuthorityInput) (req *request.Request, output *CreateGroupCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opCreateGroupCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/greengrass/groups/{GroupId}/certificateauthorities", + } + + if input == nil { + input = &CreateGroupCertificateAuthorityInput{} + } + + output = &CreateGroupCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGroupCertificateAuthority API operation for AWS Greengrass. +// +// Creates a CA for the group. If a CA already exists, it will rotate the existing +// 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 Greengrass's +// API operation CreateGroupCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupCertificateAuthority +func (c *Greengrass) CreateGroupCertificateAuthority(input *CreateGroupCertificateAuthorityInput) (*CreateGroupCertificateAuthorityOutput, error) { + req, out := c.CreateGroupCertificateAuthorityRequest(input) + return out, req.Send() +} + +// CreateGroupCertificateAuthorityWithContext is the same as CreateGroupCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGroupCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateGroupCertificateAuthorityWithContext(ctx aws.Context, input *CreateGroupCertificateAuthorityInput, opts ...request.Option) (*CreateGroupCertificateAuthorityOutput, error) { + req, out := c.CreateGroupCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateGroupVersion = "CreateGroupVersion" + +// CreateGroupVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateGroupVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGroupVersion for more information on using the CreateGroupVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGroupVersionRequest method. +// req, resp := client.CreateGroupVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupVersion +func (c *Greengrass) CreateGroupVersionRequest(input *CreateGroupVersionInput) (req *request.Request, output *CreateGroupVersionOutput) { + op := &request.Operation{ + Name: opCreateGroupVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/groups/{GroupId}/versions", + } + + if input == nil { + input = &CreateGroupVersionInput{} + } + + output = &CreateGroupVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGroupVersion API operation for AWS Greengrass. +// +// Creates a version of a group which has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateGroupVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupVersion +func (c *Greengrass) CreateGroupVersion(input *CreateGroupVersionInput) (*CreateGroupVersionOutput, error) { + req, out := c.CreateGroupVersionRequest(input) + return out, req.Send() +} + +// CreateGroupVersionWithContext is the same as CreateGroupVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGroupVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateGroupVersionWithContext(ctx aws.Context, input *CreateGroupVersionInput, opts ...request.Option) (*CreateGroupVersionOutput, error) { + req, out := c.CreateGroupVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLoggerDefinition = "CreateLoggerDefinition" + +// CreateLoggerDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateLoggerDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLoggerDefinition for more information on using the CreateLoggerDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLoggerDefinitionRequest method. +// req, resp := client.CreateLoggerDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinition +func (c *Greengrass) CreateLoggerDefinitionRequest(input *CreateLoggerDefinitionInput) (req *request.Request, output *CreateLoggerDefinitionOutput) { + op := &request.Operation{ + Name: opCreateLoggerDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/loggers", + } + + if input == nil { + input = &CreateLoggerDefinitionInput{} + } + + output = &CreateLoggerDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLoggerDefinition API operation for AWS Greengrass. +// +// Creates a logger definition. You may provide the initial version of the logger +// definition now or use ''CreateLoggerDefinitionVersion'' at a later 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 AWS Greengrass's +// API operation CreateLoggerDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinition +func (c *Greengrass) CreateLoggerDefinition(input *CreateLoggerDefinitionInput) (*CreateLoggerDefinitionOutput, error) { + req, out := c.CreateLoggerDefinitionRequest(input) + return out, req.Send() +} + +// CreateLoggerDefinitionWithContext is the same as CreateLoggerDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLoggerDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateLoggerDefinitionWithContext(ctx aws.Context, input *CreateLoggerDefinitionInput, opts ...request.Option) (*CreateLoggerDefinitionOutput, error) { + req, out := c.CreateLoggerDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLoggerDefinitionVersion = "CreateLoggerDefinitionVersion" + +// CreateLoggerDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateLoggerDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLoggerDefinitionVersion for more information on using the CreateLoggerDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLoggerDefinitionVersionRequest method. +// req, resp := client.CreateLoggerDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionVersion +func (c *Greengrass) CreateLoggerDefinitionVersionRequest(input *CreateLoggerDefinitionVersionInput) (req *request.Request, output *CreateLoggerDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateLoggerDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}/versions", + } + + if input == nil { + input = &CreateLoggerDefinitionVersionInput{} + } + + output = &CreateLoggerDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLoggerDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a logger definition that has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateLoggerDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionVersion +func (c *Greengrass) CreateLoggerDefinitionVersion(input *CreateLoggerDefinitionVersionInput) (*CreateLoggerDefinitionVersionOutput, error) { + req, out := c.CreateLoggerDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateLoggerDefinitionVersionWithContext is the same as CreateLoggerDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLoggerDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateLoggerDefinitionVersionWithContext(ctx aws.Context, input *CreateLoggerDefinitionVersionInput, opts ...request.Option) (*CreateLoggerDefinitionVersionOutput, error) { + req, out := c.CreateLoggerDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResourceDefinition = "CreateResourceDefinition" + +// CreateResourceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateResourceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResourceDefinition for more information on using the CreateResourceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResourceDefinitionRequest method. +// req, resp := client.CreateResourceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateResourceDefinition +func (c *Greengrass) CreateResourceDefinitionRequest(input *CreateResourceDefinitionInput) (req *request.Request, output *CreateResourceDefinitionOutput) { + op := &request.Operation{ + Name: opCreateResourceDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/resources", + } + + if input == nil { + input = &CreateResourceDefinitionInput{} + } + + output = &CreateResourceDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResourceDefinition API operation for AWS Greengrass. +// +// Creates a resource definition which contains a list of resources to be used +// in a group. You can create an initial version of the definition by providing +// a list of resources now, or use ''CreateResourceDefinitionVersion'' later. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateResourceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateResourceDefinition +func (c *Greengrass) CreateResourceDefinition(input *CreateResourceDefinitionInput) (*CreateResourceDefinitionOutput, error) { + req, out := c.CreateResourceDefinitionRequest(input) + return out, req.Send() +} + +// CreateResourceDefinitionWithContext is the same as CreateResourceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResourceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateResourceDefinitionWithContext(ctx aws.Context, input *CreateResourceDefinitionInput, opts ...request.Option) (*CreateResourceDefinitionOutput, error) { + req, out := c.CreateResourceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResourceDefinitionVersion = "CreateResourceDefinitionVersion" + +// CreateResourceDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateResourceDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResourceDefinitionVersion for more information on using the CreateResourceDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResourceDefinitionVersionRequest method. +// req, resp := client.CreateResourceDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateResourceDefinitionVersion +func (c *Greengrass) CreateResourceDefinitionVersionRequest(input *CreateResourceDefinitionVersionInput) (req *request.Request, output *CreateResourceDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateResourceDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}/versions", + } + + if input == nil { + input = &CreateResourceDefinitionVersionInput{} + } + + output = &CreateResourceDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResourceDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a resource definition that has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateResourceDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateResourceDefinitionVersion +func (c *Greengrass) CreateResourceDefinitionVersion(input *CreateResourceDefinitionVersionInput) (*CreateResourceDefinitionVersionOutput, error) { + req, out := c.CreateResourceDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateResourceDefinitionVersionWithContext is the same as CreateResourceDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResourceDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateResourceDefinitionVersionWithContext(ctx aws.Context, input *CreateResourceDefinitionVersionInput, opts ...request.Option) (*CreateResourceDefinitionVersionOutput, error) { + req, out := c.CreateResourceDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSoftwareUpdateJob = "CreateSoftwareUpdateJob" + +// CreateSoftwareUpdateJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateSoftwareUpdateJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSoftwareUpdateJob for more information on using the CreateSoftwareUpdateJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSoftwareUpdateJobRequest method. +// req, resp := client.CreateSoftwareUpdateJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSoftwareUpdateJob +func (c *Greengrass) CreateSoftwareUpdateJobRequest(input *CreateSoftwareUpdateJobInput) (req *request.Request, output *CreateSoftwareUpdateJobOutput) { + op := &request.Operation{ + Name: opCreateSoftwareUpdateJob, + HTTPMethod: "POST", + HTTPPath: "/greengrass/updates", + } + + if input == nil { + input = &CreateSoftwareUpdateJobInput{} + } + + output = &CreateSoftwareUpdateJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSoftwareUpdateJob API operation for AWS Greengrass. +// +// Creates a software update for a core or group of cores (specified as an IoT +// thing group.) Use this to update the OTA Agent as well as the Greengrass +// core software. It makes use of the IoT Jobs feature which provides additional +// commands to manage a Greengrass core software update job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateSoftwareUpdateJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSoftwareUpdateJob +func (c *Greengrass) CreateSoftwareUpdateJob(input *CreateSoftwareUpdateJobInput) (*CreateSoftwareUpdateJobOutput, error) { + req, out := c.CreateSoftwareUpdateJobRequest(input) + return out, req.Send() +} + +// CreateSoftwareUpdateJobWithContext is the same as CreateSoftwareUpdateJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSoftwareUpdateJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateSoftwareUpdateJobWithContext(ctx aws.Context, input *CreateSoftwareUpdateJobInput, opts ...request.Option) (*CreateSoftwareUpdateJobOutput, error) { + req, out := c.CreateSoftwareUpdateJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSubscriptionDefinition = "CreateSubscriptionDefinition" + +// CreateSubscriptionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the CreateSubscriptionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSubscriptionDefinition for more information on using the CreateSubscriptionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSubscriptionDefinitionRequest method. +// req, resp := client.CreateSubscriptionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinition +func (c *Greengrass) CreateSubscriptionDefinitionRequest(input *CreateSubscriptionDefinitionInput) (req *request.Request, output *CreateSubscriptionDefinitionOutput) { + op := &request.Operation{ + Name: opCreateSubscriptionDefinition, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/subscriptions", + } + + if input == nil { + input = &CreateSubscriptionDefinitionInput{} + } + + output = &CreateSubscriptionDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSubscriptionDefinition API operation for AWS Greengrass. +// +// Creates a subscription definition. You may provide the initial version of +// the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' +// at a later 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 AWS Greengrass's +// API operation CreateSubscriptionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinition +func (c *Greengrass) CreateSubscriptionDefinition(input *CreateSubscriptionDefinitionInput) (*CreateSubscriptionDefinitionOutput, error) { + req, out := c.CreateSubscriptionDefinitionRequest(input) + return out, req.Send() +} + +// CreateSubscriptionDefinitionWithContext is the same as CreateSubscriptionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSubscriptionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateSubscriptionDefinitionWithContext(ctx aws.Context, input *CreateSubscriptionDefinitionInput, opts ...request.Option) (*CreateSubscriptionDefinitionOutput, error) { + req, out := c.CreateSubscriptionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSubscriptionDefinitionVersion = "CreateSubscriptionDefinitionVersion" + +// CreateSubscriptionDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateSubscriptionDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSubscriptionDefinitionVersion for more information on using the CreateSubscriptionDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSubscriptionDefinitionVersionRequest method. +// req, resp := client.CreateSubscriptionDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionVersion +func (c *Greengrass) CreateSubscriptionDefinitionVersionRequest(input *CreateSubscriptionDefinitionVersionInput) (req *request.Request, output *CreateSubscriptionDefinitionVersionOutput) { + op := &request.Operation{ + Name: opCreateSubscriptionDefinitionVersion, + HTTPMethod: "POST", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions", + } + + if input == nil { + input = &CreateSubscriptionDefinitionVersionInput{} + } + + output = &CreateSubscriptionDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSubscriptionDefinitionVersion API operation for AWS Greengrass. +// +// Creates a version of a subscription definition which has already been defined. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation CreateSubscriptionDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionVersion +func (c *Greengrass) CreateSubscriptionDefinitionVersion(input *CreateSubscriptionDefinitionVersionInput) (*CreateSubscriptionDefinitionVersionOutput, error) { + req, out := c.CreateSubscriptionDefinitionVersionRequest(input) + return out, req.Send() +} + +// CreateSubscriptionDefinitionVersionWithContext is the same as CreateSubscriptionDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSubscriptionDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) CreateSubscriptionDefinitionVersionWithContext(ctx aws.Context, input *CreateSubscriptionDefinitionVersionInput, opts ...request.Option) (*CreateSubscriptionDefinitionVersionOutput, error) { + req, out := c.CreateSubscriptionDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteConnectorDefinition = "DeleteConnectorDefinition" + +// DeleteConnectorDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConnectorDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConnectorDefinition for more information on using the DeleteConnectorDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConnectorDefinitionRequest method. +// req, resp := client.DeleteConnectorDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition +func (c *Greengrass) DeleteConnectorDefinitionRequest(input *DeleteConnectorDefinitionInput) (req *request.Request, output *DeleteConnectorDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteConnectorDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}", + } + + if input == nil { + input = &DeleteConnectorDefinitionInput{} + } + + output = &DeleteConnectorDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteConnectorDefinition API operation for AWS Greengrass. +// +// Deletes a connector definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteConnectorDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition +func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { + req, out := c.DeleteConnectorDefinitionRequest(input) + return out, req.Send() +} + +// DeleteConnectorDefinitionWithContext is the same as DeleteConnectorDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConnectorDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteConnectorDefinitionWithContext(ctx aws.Context, input *DeleteConnectorDefinitionInput, opts ...request.Option) (*DeleteConnectorDefinitionOutput, error) { + req, out := c.DeleteConnectorDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCoreDefinition = "DeleteCoreDefinition" + +// DeleteCoreDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCoreDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCoreDefinition for more information on using the DeleteCoreDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteCoreDefinitionRequest method. +// req, resp := client.DeleteCoreDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteCoreDefinition +func (c *Greengrass) DeleteCoreDefinitionRequest(input *DeleteCoreDefinitionInput) (req *request.Request, output *DeleteCoreDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteCoreDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}", + } + + if input == nil { + input = &DeleteCoreDefinitionInput{} + } + + output = &DeleteCoreDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCoreDefinition API operation for AWS Greengrass. +// +// Deletes a core definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteCoreDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteCoreDefinition +func (c *Greengrass) DeleteCoreDefinition(input *DeleteCoreDefinitionInput) (*DeleteCoreDefinitionOutput, error) { + req, out := c.DeleteCoreDefinitionRequest(input) + return out, req.Send() +} + +// DeleteCoreDefinitionWithContext is the same as DeleteCoreDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCoreDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteCoreDefinitionWithContext(ctx aws.Context, input *DeleteCoreDefinitionInput, opts ...request.Option) (*DeleteCoreDefinitionOutput, error) { + req, out := c.DeleteCoreDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDeviceDefinition = "DeleteDeviceDefinition" + +// DeleteDeviceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDeviceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDeviceDefinition for more information on using the DeleteDeviceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDeviceDefinitionRequest method. +// req, resp := client.DeleteDeviceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteDeviceDefinition +func (c *Greengrass) DeleteDeviceDefinitionRequest(input *DeleteDeviceDefinitionInput) (req *request.Request, output *DeleteDeviceDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteDeviceDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}", + } + + if input == nil { + input = &DeleteDeviceDefinitionInput{} + } + + output = &DeleteDeviceDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDeviceDefinition API operation for AWS Greengrass. +// +// Deletes a device definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteDeviceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteDeviceDefinition +func (c *Greengrass) DeleteDeviceDefinition(input *DeleteDeviceDefinitionInput) (*DeleteDeviceDefinitionOutput, error) { + req, out := c.DeleteDeviceDefinitionRequest(input) + return out, req.Send() +} + +// DeleteDeviceDefinitionWithContext is the same as DeleteDeviceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDeviceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteDeviceDefinitionWithContext(ctx aws.Context, input *DeleteDeviceDefinitionInput, opts ...request.Option) (*DeleteDeviceDefinitionOutput, error) { + req, out := c.DeleteDeviceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFunctionDefinition = "DeleteFunctionDefinition" + +// DeleteFunctionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFunctionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFunctionDefinition for more information on using the DeleteFunctionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFunctionDefinitionRequest method. +// req, resp := client.DeleteFunctionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteFunctionDefinition +func (c *Greengrass) DeleteFunctionDefinitionRequest(input *DeleteFunctionDefinitionInput) (req *request.Request, output *DeleteFunctionDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteFunctionDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}", + } + + if input == nil { + input = &DeleteFunctionDefinitionInput{} + } + + output = &DeleteFunctionDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteFunctionDefinition API operation for AWS Greengrass. +// +// Deletes a Lambda function definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteFunctionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteFunctionDefinition +func (c *Greengrass) DeleteFunctionDefinition(input *DeleteFunctionDefinitionInput) (*DeleteFunctionDefinitionOutput, error) { + req, out := c.DeleteFunctionDefinitionRequest(input) + return out, req.Send() +} + +// DeleteFunctionDefinitionWithContext is the same as DeleteFunctionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFunctionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteFunctionDefinitionWithContext(ctx aws.Context, input *DeleteFunctionDefinitionInput, opts ...request.Option) (*DeleteFunctionDefinitionOutput, error) { + req, out := c.DeleteFunctionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGroup = "DeleteGroup" + +// DeleteGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGroup for more information on using the DeleteGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGroupRequest method. +// req, resp := client.DeleteGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteGroup +func (c *Greengrass) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { + op := &request.Operation{ + Name: opDeleteGroup, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/groups/{GroupId}", + } + + if input == nil { + input = &DeleteGroupInput{} + } + + output = &DeleteGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteGroup API operation for AWS Greengrass. +// +// Deletes a 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 Greengrass's +// API operation DeleteGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteGroup +func (c *Greengrass) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + return out, req.Send() +} + +// DeleteGroupWithContext is the same as DeleteGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLoggerDefinition = "DeleteLoggerDefinition" + +// DeleteLoggerDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoggerDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLoggerDefinition for more information on using the DeleteLoggerDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLoggerDefinitionRequest method. +// req, resp := client.DeleteLoggerDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteLoggerDefinition +func (c *Greengrass) DeleteLoggerDefinitionRequest(input *DeleteLoggerDefinitionInput) (req *request.Request, output *DeleteLoggerDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteLoggerDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}", + } + + if input == nil { + input = &DeleteLoggerDefinitionInput{} + } + + output = &DeleteLoggerDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLoggerDefinition API operation for AWS Greengrass. +// +// Deletes a logger definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteLoggerDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteLoggerDefinition +func (c *Greengrass) DeleteLoggerDefinition(input *DeleteLoggerDefinitionInput) (*DeleteLoggerDefinitionOutput, error) { + req, out := c.DeleteLoggerDefinitionRequest(input) + return out, req.Send() +} + +// DeleteLoggerDefinitionWithContext is the same as DeleteLoggerDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLoggerDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteLoggerDefinitionWithContext(ctx aws.Context, input *DeleteLoggerDefinitionInput, opts ...request.Option) (*DeleteLoggerDefinitionOutput, error) { + req, out := c.DeleteLoggerDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResourceDefinition = "DeleteResourceDefinition" + +// DeleteResourceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourceDefinition for more information on using the DeleteResourceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourceDefinitionRequest method. +// req, resp := client.DeleteResourceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteResourceDefinition +func (c *Greengrass) DeleteResourceDefinitionRequest(input *DeleteResourceDefinitionInput) (req *request.Request, output *DeleteResourceDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteResourceDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}", + } + + if input == nil { + input = &DeleteResourceDefinitionInput{} + } + + output = &DeleteResourceDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteResourceDefinition API operation for AWS Greengrass. +// +// Deletes a resource definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteResourceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteResourceDefinition +func (c *Greengrass) DeleteResourceDefinition(input *DeleteResourceDefinitionInput) (*DeleteResourceDefinitionOutput, error) { + req, out := c.DeleteResourceDefinitionRequest(input) + return out, req.Send() +} + +// DeleteResourceDefinitionWithContext is the same as DeleteResourceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteResourceDefinitionWithContext(ctx aws.Context, input *DeleteResourceDefinitionInput, opts ...request.Option) (*DeleteResourceDefinitionOutput, error) { + req, out := c.DeleteResourceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSubscriptionDefinition = "DeleteSubscriptionDefinition" + +// DeleteSubscriptionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSubscriptionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSubscriptionDefinition for more information on using the DeleteSubscriptionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSubscriptionDefinitionRequest method. +// req, resp := client.DeleteSubscriptionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteSubscriptionDefinition +func (c *Greengrass) DeleteSubscriptionDefinitionRequest(input *DeleteSubscriptionDefinitionInput) (req *request.Request, output *DeleteSubscriptionDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteSubscriptionDefinition, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}", + } + + if input == nil { + input = &DeleteSubscriptionDefinitionInput{} + } + + output = &DeleteSubscriptionDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteSubscriptionDefinition API operation for AWS Greengrass. +// +// Deletes a subscription definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DeleteSubscriptionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteSubscriptionDefinition +func (c *Greengrass) DeleteSubscriptionDefinition(input *DeleteSubscriptionDefinitionInput) (*DeleteSubscriptionDefinitionOutput, error) { + req, out := c.DeleteSubscriptionDefinitionRequest(input) + return out, req.Send() +} + +// DeleteSubscriptionDefinitionWithContext is the same as DeleteSubscriptionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSubscriptionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DeleteSubscriptionDefinitionWithContext(ctx aws.Context, input *DeleteSubscriptionDefinitionInput, opts ...request.Option) (*DeleteSubscriptionDefinitionOutput, error) { + req, out := c.DeleteSubscriptionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateRoleFromGroup = "DisassociateRoleFromGroup" + +// DisassociateRoleFromGroupRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateRoleFromGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateRoleFromGroup for more information on using the DisassociateRoleFromGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateRoleFromGroupRequest method. +// req, resp := client.DisassociateRoleFromGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateRoleFromGroup +func (c *Greengrass) DisassociateRoleFromGroupRequest(input *DisassociateRoleFromGroupInput) (req *request.Request, output *DisassociateRoleFromGroupOutput) { + op := &request.Operation{ + Name: opDisassociateRoleFromGroup, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/groups/{GroupId}/role", + } + + if input == nil { + input = &DisassociateRoleFromGroupInput{} + } + + output = &DisassociateRoleFromGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateRoleFromGroup API operation for AWS Greengrass. +// +// Disassociates the role from a 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 Greengrass's +// API operation DisassociateRoleFromGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateRoleFromGroup +func (c *Greengrass) DisassociateRoleFromGroup(input *DisassociateRoleFromGroupInput) (*DisassociateRoleFromGroupOutput, error) { + req, out := c.DisassociateRoleFromGroupRequest(input) + return out, req.Send() +} + +// DisassociateRoleFromGroupWithContext is the same as DisassociateRoleFromGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateRoleFromGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DisassociateRoleFromGroupWithContext(ctx aws.Context, input *DisassociateRoleFromGroupInput, opts ...request.Option) (*DisassociateRoleFromGroupOutput, error) { + req, out := c.DisassociateRoleFromGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateServiceRoleFromAccount = "DisassociateServiceRoleFromAccount" + +// DisassociateServiceRoleFromAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateServiceRoleFromAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateServiceRoleFromAccount for more information on using the DisassociateServiceRoleFromAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateServiceRoleFromAccountRequest method. +// req, resp := client.DisassociateServiceRoleFromAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateServiceRoleFromAccount +func (c *Greengrass) DisassociateServiceRoleFromAccountRequest(input *DisassociateServiceRoleFromAccountInput) (req *request.Request, output *DisassociateServiceRoleFromAccountOutput) { + op := &request.Operation{ + Name: opDisassociateServiceRoleFromAccount, + HTTPMethod: "DELETE", + HTTPPath: "/greengrass/servicerole", + } + + if input == nil { + input = &DisassociateServiceRoleFromAccountInput{} + } + + output = &DisassociateServiceRoleFromAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateServiceRoleFromAccount API operation for AWS Greengrass. +// +// Disassociates the service role from your account. Without a service role, +// deployments will not work. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation DisassociateServiceRoleFromAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateServiceRoleFromAccount +func (c *Greengrass) DisassociateServiceRoleFromAccount(input *DisassociateServiceRoleFromAccountInput) (*DisassociateServiceRoleFromAccountOutput, error) { + req, out := c.DisassociateServiceRoleFromAccountRequest(input) + return out, req.Send() +} + +// DisassociateServiceRoleFromAccountWithContext is the same as DisassociateServiceRoleFromAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateServiceRoleFromAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) DisassociateServiceRoleFromAccountWithContext(ctx aws.Context, input *DisassociateServiceRoleFromAccountInput, opts ...request.Option) (*DisassociateServiceRoleFromAccountOutput, error) { + req, out := c.DisassociateServiceRoleFromAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAssociatedRole = "GetAssociatedRole" + +// GetAssociatedRoleRequest generates a "aws/request.Request" representing the +// client's request for the GetAssociatedRole operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAssociatedRole for more information on using the GetAssociatedRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAssociatedRoleRequest method. +// req, resp := client.GetAssociatedRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetAssociatedRole +func (c *Greengrass) GetAssociatedRoleRequest(input *GetAssociatedRoleInput) (req *request.Request, output *GetAssociatedRoleOutput) { + op := &request.Operation{ + Name: opGetAssociatedRole, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/role", + } + + if input == nil { + input = &GetAssociatedRoleInput{} + } + + output = &GetAssociatedRoleOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAssociatedRole API operation for AWS Greengrass. +// +// Retrieves the role associated with a particular 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 Greengrass's +// API operation GetAssociatedRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetAssociatedRole +func (c *Greengrass) GetAssociatedRole(input *GetAssociatedRoleInput) (*GetAssociatedRoleOutput, error) { + req, out := c.GetAssociatedRoleRequest(input) + return out, req.Send() +} + +// GetAssociatedRoleWithContext is the same as GetAssociatedRole with the addition of +// the ability to pass a context and additional request options. +// +// See GetAssociatedRole for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetAssociatedRoleWithContext(ctx aws.Context, input *GetAssociatedRoleInput, opts ...request.Option) (*GetAssociatedRoleOutput, error) { + req, out := c.GetAssociatedRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBulkDeploymentStatus = "GetBulkDeploymentStatus" + +// GetBulkDeploymentStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetBulkDeploymentStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBulkDeploymentStatus for more information on using the GetBulkDeploymentStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBulkDeploymentStatusRequest method. +// req, resp := client.GetBulkDeploymentStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetBulkDeploymentStatus +func (c *Greengrass) GetBulkDeploymentStatusRequest(input *GetBulkDeploymentStatusInput) (req *request.Request, output *GetBulkDeploymentStatusOutput) { + op := &request.Operation{ + Name: opGetBulkDeploymentStatus, + HTTPMethod: "GET", + HTTPPath: "/greengrass/bulk/deployments/{BulkDeploymentId}/status", + } + + if input == nil { + input = &GetBulkDeploymentStatusInput{} + } + + output = &GetBulkDeploymentStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBulkDeploymentStatus API operation for AWS Greengrass. +// +// Returns the status of a bulk deployment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetBulkDeploymentStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetBulkDeploymentStatus +func (c *Greengrass) GetBulkDeploymentStatus(input *GetBulkDeploymentStatusInput) (*GetBulkDeploymentStatusOutput, error) { + req, out := c.GetBulkDeploymentStatusRequest(input) + return out, req.Send() +} + +// GetBulkDeploymentStatusWithContext is the same as GetBulkDeploymentStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetBulkDeploymentStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetBulkDeploymentStatusWithContext(ctx aws.Context, input *GetBulkDeploymentStatusInput, opts ...request.Option) (*GetBulkDeploymentStatusOutput, error) { + req, out := c.GetBulkDeploymentStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetConnectivityInfo = "GetConnectivityInfo" + +// GetConnectivityInfoRequest generates a "aws/request.Request" representing the +// client's request for the GetConnectivityInfo operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetConnectivityInfo for more information on using the GetConnectivityInfo +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetConnectivityInfoRequest method. +// req, resp := client.GetConnectivityInfoRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectivityInfo +func (c *Greengrass) GetConnectivityInfoRequest(input *GetConnectivityInfoInput) (req *request.Request, output *GetConnectivityInfoOutput) { + op := &request.Operation{ + Name: opGetConnectivityInfo, + HTTPMethod: "GET", + HTTPPath: "/greengrass/things/{ThingName}/connectivityInfo", + } + + if input == nil { + input = &GetConnectivityInfoInput{} + } + + output = &GetConnectivityInfoOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetConnectivityInfo API operation for AWS Greengrass. +// +// Retrieves the connectivity information for a core. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetConnectivityInfo for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectivityInfo +func (c *Greengrass) GetConnectivityInfo(input *GetConnectivityInfoInput) (*GetConnectivityInfoOutput, error) { + req, out := c.GetConnectivityInfoRequest(input) + return out, req.Send() +} + +// GetConnectivityInfoWithContext is the same as GetConnectivityInfo with the addition of +// the ability to pass a context and additional request options. +// +// See GetConnectivityInfo for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetConnectivityInfoWithContext(ctx aws.Context, input *GetConnectivityInfoInput, opts ...request.Option) (*GetConnectivityInfoOutput, error) { + req, out := c.GetConnectivityInfoRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetConnectorDefinition = "GetConnectorDefinition" + +// GetConnectorDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetConnectorDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetConnectorDefinition for more information on using the GetConnectorDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetConnectorDefinitionRequest method. +// req, resp := client.GetConnectorDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectorDefinition +func (c *Greengrass) GetConnectorDefinitionRequest(input *GetConnectorDefinitionInput) (req *request.Request, output *GetConnectorDefinitionOutput) { + op := &request.Operation{ + Name: opGetConnectorDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}", + } + + if input == nil { + input = &GetConnectorDefinitionInput{} + } + + output = &GetConnectorDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetConnectorDefinition API operation for AWS Greengrass. +// +// Retrieves information about a connector definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetConnectorDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectorDefinition +func (c *Greengrass) GetConnectorDefinition(input *GetConnectorDefinitionInput) (*GetConnectorDefinitionOutput, error) { + req, out := c.GetConnectorDefinitionRequest(input) + return out, req.Send() +} + +// GetConnectorDefinitionWithContext is the same as GetConnectorDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetConnectorDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetConnectorDefinitionWithContext(ctx aws.Context, input *GetConnectorDefinitionInput, opts ...request.Option) (*GetConnectorDefinitionOutput, error) { + req, out := c.GetConnectorDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetConnectorDefinitionVersion = "GetConnectorDefinitionVersion" + +// GetConnectorDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetConnectorDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetConnectorDefinitionVersion for more information on using the GetConnectorDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetConnectorDefinitionVersionRequest method. +// req, resp := client.GetConnectorDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectorDefinitionVersion +func (c *Greengrass) GetConnectorDefinitionVersionRequest(input *GetConnectorDefinitionVersionInput) (req *request.Request, output *GetConnectorDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetConnectorDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}/versions/{ConnectorDefinitionVersionId}", + } + + if input == nil { + input = &GetConnectorDefinitionVersionInput{} + } + + output = &GetConnectorDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetConnectorDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a connector definition version, including the +// connectors that the version contains. Connectors are prebuilt modules that +// interact with local infrastructure, device protocols, AWS, and other cloud +// services. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetConnectorDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectorDefinitionVersion +func (c *Greengrass) GetConnectorDefinitionVersion(input *GetConnectorDefinitionVersionInput) (*GetConnectorDefinitionVersionOutput, error) { + req, out := c.GetConnectorDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetConnectorDefinitionVersionWithContext is the same as GetConnectorDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetConnectorDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetConnectorDefinitionVersionWithContext(ctx aws.Context, input *GetConnectorDefinitionVersionInput, opts ...request.Option) (*GetConnectorDefinitionVersionOutput, error) { + req, out := c.GetConnectorDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCoreDefinition = "GetCoreDefinition" + +// GetCoreDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetCoreDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCoreDefinition for more information on using the GetCoreDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCoreDefinitionRequest method. +// req, resp := client.GetCoreDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinition +func (c *Greengrass) GetCoreDefinitionRequest(input *GetCoreDefinitionInput) (req *request.Request, output *GetCoreDefinitionOutput) { + op := &request.Operation{ + Name: opGetCoreDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}", + } + + if input == nil { + input = &GetCoreDefinitionInput{} + } + + output = &GetCoreDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCoreDefinition API operation for AWS Greengrass. +// +// Retrieves information about a core definition version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetCoreDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinition +func (c *Greengrass) GetCoreDefinition(input *GetCoreDefinitionInput) (*GetCoreDefinitionOutput, error) { + req, out := c.GetCoreDefinitionRequest(input) + return out, req.Send() +} + +// GetCoreDefinitionWithContext is the same as GetCoreDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetCoreDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetCoreDefinitionWithContext(ctx aws.Context, input *GetCoreDefinitionInput, opts ...request.Option) (*GetCoreDefinitionOutput, error) { + req, out := c.GetCoreDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCoreDefinitionVersion = "GetCoreDefinitionVersion" + +// GetCoreDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetCoreDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCoreDefinitionVersion for more information on using the GetCoreDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCoreDefinitionVersionRequest method. +// req, resp := client.GetCoreDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionVersion +func (c *Greengrass) GetCoreDefinitionVersionRequest(input *GetCoreDefinitionVersionInput) (req *request.Request, output *GetCoreDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetCoreDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}/versions/{CoreDefinitionVersionId}", + } + + if input == nil { + input = &GetCoreDefinitionVersionInput{} + } + + output = &GetCoreDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCoreDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a core definition version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetCoreDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionVersion +func (c *Greengrass) GetCoreDefinitionVersion(input *GetCoreDefinitionVersionInput) (*GetCoreDefinitionVersionOutput, error) { + req, out := c.GetCoreDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetCoreDefinitionVersionWithContext is the same as GetCoreDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetCoreDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetCoreDefinitionVersionWithContext(ctx aws.Context, input *GetCoreDefinitionVersionInput, opts ...request.Option) (*GetCoreDefinitionVersionOutput, error) { + req, out := c.GetCoreDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDeploymentStatus = "GetDeploymentStatus" + +// GetDeploymentStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetDeploymentStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeploymentStatus for more information on using the GetDeploymentStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeploymentStatusRequest method. +// req, resp := client.GetDeploymentStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeploymentStatus +func (c *Greengrass) GetDeploymentStatusRequest(input *GetDeploymentStatusInput) (req *request.Request, output *GetDeploymentStatusOutput) { + op := &request.Operation{ + Name: opGetDeploymentStatus, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/deployments/{DeploymentId}/status", + } + + if input == nil { + input = &GetDeploymentStatusInput{} + } + + output = &GetDeploymentStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeploymentStatus API operation for AWS Greengrass. +// +// Returns the status of a deployment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetDeploymentStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeploymentStatus +func (c *Greengrass) GetDeploymentStatus(input *GetDeploymentStatusInput) (*GetDeploymentStatusOutput, error) { + req, out := c.GetDeploymentStatusRequest(input) + return out, req.Send() +} + +// GetDeploymentStatusWithContext is the same as GetDeploymentStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeploymentStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetDeploymentStatusWithContext(ctx aws.Context, input *GetDeploymentStatusInput, opts ...request.Option) (*GetDeploymentStatusOutput, error) { + req, out := c.GetDeploymentStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDeviceDefinition = "GetDeviceDefinition" + +// GetDeviceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetDeviceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeviceDefinition for more information on using the GetDeviceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeviceDefinitionRequest method. +// req, resp := client.GetDeviceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinition +func (c *Greengrass) GetDeviceDefinitionRequest(input *GetDeviceDefinitionInput) (req *request.Request, output *GetDeviceDefinitionOutput) { + op := &request.Operation{ + Name: opGetDeviceDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}", + } + + if input == nil { + input = &GetDeviceDefinitionInput{} + } + + output = &GetDeviceDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeviceDefinition API operation for AWS Greengrass. +// +// Retrieves information about a device definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetDeviceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinition +func (c *Greengrass) GetDeviceDefinition(input *GetDeviceDefinitionInput) (*GetDeviceDefinitionOutput, error) { + req, out := c.GetDeviceDefinitionRequest(input) + return out, req.Send() +} + +// GetDeviceDefinitionWithContext is the same as GetDeviceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeviceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetDeviceDefinitionWithContext(ctx aws.Context, input *GetDeviceDefinitionInput, opts ...request.Option) (*GetDeviceDefinitionOutput, error) { + req, out := c.GetDeviceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDeviceDefinitionVersion = "GetDeviceDefinitionVersion" + +// GetDeviceDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetDeviceDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeviceDefinitionVersion for more information on using the GetDeviceDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeviceDefinitionVersionRequest method. +// req, resp := client.GetDeviceDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionVersion +func (c *Greengrass) GetDeviceDefinitionVersionRequest(input *GetDeviceDefinitionVersionInput) (req *request.Request, output *GetDeviceDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetDeviceDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}/versions/{DeviceDefinitionVersionId}", + } + + if input == nil { + input = &GetDeviceDefinitionVersionInput{} + } + + output = &GetDeviceDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeviceDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a device definition version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetDeviceDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionVersion +func (c *Greengrass) GetDeviceDefinitionVersion(input *GetDeviceDefinitionVersionInput) (*GetDeviceDefinitionVersionOutput, error) { + req, out := c.GetDeviceDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetDeviceDefinitionVersionWithContext is the same as GetDeviceDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeviceDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetDeviceDefinitionVersionWithContext(ctx aws.Context, input *GetDeviceDefinitionVersionInput, opts ...request.Option) (*GetDeviceDefinitionVersionOutput, error) { + req, out := c.GetDeviceDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetFunctionDefinition = "GetFunctionDefinition" + +// GetFunctionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetFunctionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFunctionDefinition for more information on using the GetFunctionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFunctionDefinitionRequest method. +// req, resp := client.GetFunctionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinition +func (c *Greengrass) GetFunctionDefinitionRequest(input *GetFunctionDefinitionInput) (req *request.Request, output *GetFunctionDefinitionOutput) { + op := &request.Operation{ + Name: opGetFunctionDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}", + } + + if input == nil { + input = &GetFunctionDefinitionInput{} + } + + output = &GetFunctionDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFunctionDefinition API operation for AWS Greengrass. +// +// Retrieves information about a Lambda function definition, including its creation +// time and latest version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetFunctionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinition +func (c *Greengrass) GetFunctionDefinition(input *GetFunctionDefinitionInput) (*GetFunctionDefinitionOutput, error) { + req, out := c.GetFunctionDefinitionRequest(input) + return out, req.Send() +} + +// GetFunctionDefinitionWithContext is the same as GetFunctionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetFunctionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetFunctionDefinitionWithContext(ctx aws.Context, input *GetFunctionDefinitionInput, opts ...request.Option) (*GetFunctionDefinitionOutput, error) { + req, out := c.GetFunctionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetFunctionDefinitionVersion = "GetFunctionDefinitionVersion" + +// GetFunctionDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetFunctionDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFunctionDefinitionVersion for more information on using the GetFunctionDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFunctionDefinitionVersionRequest method. +// req, resp := client.GetFunctionDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionVersion +func (c *Greengrass) GetFunctionDefinitionVersionRequest(input *GetFunctionDefinitionVersionInput) (req *request.Request, output *GetFunctionDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetFunctionDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}/versions/{FunctionDefinitionVersionId}", + } + + if input == nil { + input = &GetFunctionDefinitionVersionInput{} + } + + output = &GetFunctionDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFunctionDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a Lambda function definition version, including +// which Lambda functions are included in the version and their configurations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetFunctionDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionVersion +func (c *Greengrass) GetFunctionDefinitionVersion(input *GetFunctionDefinitionVersionInput) (*GetFunctionDefinitionVersionOutput, error) { + req, out := c.GetFunctionDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetFunctionDefinitionVersionWithContext is the same as GetFunctionDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetFunctionDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetFunctionDefinitionVersionWithContext(ctx aws.Context, input *GetFunctionDefinitionVersionInput, opts ...request.Option) (*GetFunctionDefinitionVersionOutput, error) { + req, out := c.GetFunctionDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroup = "GetGroup" + +// GetGroupRequest generates a "aws/request.Request" representing the +// client's request for the GetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroup for more information on using the GetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupRequest method. +// req, resp := client.GetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroup +func (c *Greengrass) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { + op := &request.Operation{ + Name: opGetGroup, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}", + } + + if input == nil { + input = &GetGroupInput{} + } + + output = &GetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroup API operation for AWS Greengrass. +// +// Retrieves information about a 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 Greengrass's +// API operation GetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroup +func (c *Greengrass) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) + return out, req.Send() +} + +// GetGroupWithContext is the same as GetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroupCertificateAuthority = "GetGroupCertificateAuthority" + +// GetGroupCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the GetGroupCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroupCertificateAuthority for more information on using the GetGroupCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupCertificateAuthorityRequest method. +// req, resp := client.GetGroupCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateAuthority +func (c *Greengrass) GetGroupCertificateAuthorityRequest(input *GetGroupCertificateAuthorityInput) (req *request.Request, output *GetGroupCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opGetGroupCertificateAuthority, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/certificateauthorities/{CertificateAuthorityId}", + } + + if input == nil { + input = &GetGroupCertificateAuthorityInput{} + } + + output = &GetGroupCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroupCertificateAuthority API operation for AWS Greengrass. +// +// Retreives the CA associated with a group. Returns the public key of the CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetGroupCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateAuthority +func (c *Greengrass) GetGroupCertificateAuthority(input *GetGroupCertificateAuthorityInput) (*GetGroupCertificateAuthorityOutput, error) { + req, out := c.GetGroupCertificateAuthorityRequest(input) + return out, req.Send() +} + +// GetGroupCertificateAuthorityWithContext is the same as GetGroupCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroupCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetGroupCertificateAuthorityWithContext(ctx aws.Context, input *GetGroupCertificateAuthorityInput, opts ...request.Option) (*GetGroupCertificateAuthorityOutput, error) { + req, out := c.GetGroupCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroupCertificateConfiguration = "GetGroupCertificateConfiguration" + +// GetGroupCertificateConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetGroupCertificateConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroupCertificateConfiguration for more information on using the GetGroupCertificateConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupCertificateConfigurationRequest method. +// req, resp := client.GetGroupCertificateConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateConfiguration +func (c *Greengrass) GetGroupCertificateConfigurationRequest(input *GetGroupCertificateConfigurationInput) (req *request.Request, output *GetGroupCertificateConfigurationOutput) { + op := &request.Operation{ + Name: opGetGroupCertificateConfiguration, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry", + } + + if input == nil { + input = &GetGroupCertificateConfigurationInput{} + } + + output = &GetGroupCertificateConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroupCertificateConfiguration API operation for AWS Greengrass. +// +// Retrieves the current configuration for the CA used by the 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 Greengrass's +// API operation GetGroupCertificateConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateConfiguration +func (c *Greengrass) GetGroupCertificateConfiguration(input *GetGroupCertificateConfigurationInput) (*GetGroupCertificateConfigurationOutput, error) { + req, out := c.GetGroupCertificateConfigurationRequest(input) + return out, req.Send() +} + +// GetGroupCertificateConfigurationWithContext is the same as GetGroupCertificateConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroupCertificateConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetGroupCertificateConfigurationWithContext(ctx aws.Context, input *GetGroupCertificateConfigurationInput, opts ...request.Option) (*GetGroupCertificateConfigurationOutput, error) { + req, out := c.GetGroupCertificateConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroupVersion = "GetGroupVersion" + +// GetGroupVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetGroupVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroupVersion for more information on using the GetGroupVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupVersionRequest method. +// req, resp := client.GetGroupVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupVersion +func (c *Greengrass) GetGroupVersionRequest(input *GetGroupVersionInput) (req *request.Request, output *GetGroupVersionOutput) { + op := &request.Operation{ + Name: opGetGroupVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/versions/{GroupVersionId}", + } + + if input == nil { + input = &GetGroupVersionInput{} + } + + output = &GetGroupVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroupVersion API operation for AWS Greengrass. +// +// Retrieves information about a group version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetGroupVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupVersion +func (c *Greengrass) GetGroupVersion(input *GetGroupVersionInput) (*GetGroupVersionOutput, error) { + req, out := c.GetGroupVersionRequest(input) + return out, req.Send() +} + +// GetGroupVersionWithContext is the same as GetGroupVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroupVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetGroupVersionWithContext(ctx aws.Context, input *GetGroupVersionInput, opts ...request.Option) (*GetGroupVersionOutput, error) { + req, out := c.GetGroupVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLoggerDefinition = "GetLoggerDefinition" + +// GetLoggerDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggerDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggerDefinition for more information on using the GetLoggerDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggerDefinitionRequest method. +// req, resp := client.GetLoggerDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinition +func (c *Greengrass) GetLoggerDefinitionRequest(input *GetLoggerDefinitionInput) (req *request.Request, output *GetLoggerDefinitionOutput) { + op := &request.Operation{ + Name: opGetLoggerDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}", + } + + if input == nil { + input = &GetLoggerDefinitionInput{} + } + + output = &GetLoggerDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggerDefinition API operation for AWS Greengrass. +// +// Retrieves information about a logger definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetLoggerDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinition +func (c *Greengrass) GetLoggerDefinition(input *GetLoggerDefinitionInput) (*GetLoggerDefinitionOutput, error) { + req, out := c.GetLoggerDefinitionRequest(input) + return out, req.Send() +} + +// GetLoggerDefinitionWithContext is the same as GetLoggerDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggerDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetLoggerDefinitionWithContext(ctx aws.Context, input *GetLoggerDefinitionInput, opts ...request.Option) (*GetLoggerDefinitionOutput, error) { + req, out := c.GetLoggerDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLoggerDefinitionVersion = "GetLoggerDefinitionVersion" + +// GetLoggerDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggerDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggerDefinitionVersion for more information on using the GetLoggerDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggerDefinitionVersionRequest method. +// req, resp := client.GetLoggerDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionVersion +func (c *Greengrass) GetLoggerDefinitionVersionRequest(input *GetLoggerDefinitionVersionInput) (req *request.Request, output *GetLoggerDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetLoggerDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}/versions/{LoggerDefinitionVersionId}", + } + + if input == nil { + input = &GetLoggerDefinitionVersionInput{} + } + + output = &GetLoggerDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggerDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a logger definition version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetLoggerDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionVersion +func (c *Greengrass) GetLoggerDefinitionVersion(input *GetLoggerDefinitionVersionInput) (*GetLoggerDefinitionVersionOutput, error) { + req, out := c.GetLoggerDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetLoggerDefinitionVersionWithContext is the same as GetLoggerDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggerDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetLoggerDefinitionVersionWithContext(ctx aws.Context, input *GetLoggerDefinitionVersionInput, opts ...request.Option) (*GetLoggerDefinitionVersionOutput, error) { + req, out := c.GetLoggerDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResourceDefinition = "GetResourceDefinition" + +// GetResourceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetResourceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourceDefinition for more information on using the GetResourceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourceDefinitionRequest method. +// req, resp := client.GetResourceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetResourceDefinition +func (c *Greengrass) GetResourceDefinitionRequest(input *GetResourceDefinitionInput) (req *request.Request, output *GetResourceDefinitionOutput) { + op := &request.Operation{ + Name: opGetResourceDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}", + } + + if input == nil { + input = &GetResourceDefinitionInput{} + } + + output = &GetResourceDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourceDefinition API operation for AWS Greengrass. +// +// Retrieves information about a resource definition, including its creation +// time and latest version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetResourceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetResourceDefinition +func (c *Greengrass) GetResourceDefinition(input *GetResourceDefinitionInput) (*GetResourceDefinitionOutput, error) { + req, out := c.GetResourceDefinitionRequest(input) + return out, req.Send() +} + +// GetResourceDefinitionWithContext is the same as GetResourceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetResourceDefinitionWithContext(ctx aws.Context, input *GetResourceDefinitionInput, opts ...request.Option) (*GetResourceDefinitionOutput, error) { + req, out := c.GetResourceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResourceDefinitionVersion = "GetResourceDefinitionVersion" + +// GetResourceDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetResourceDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourceDefinitionVersion for more information on using the GetResourceDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourceDefinitionVersionRequest method. +// req, resp := client.GetResourceDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetResourceDefinitionVersion +func (c *Greengrass) GetResourceDefinitionVersionRequest(input *GetResourceDefinitionVersionInput) (req *request.Request, output *GetResourceDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetResourceDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}/versions/{ResourceDefinitionVersionId}", + } + + if input == nil { + input = &GetResourceDefinitionVersionInput{} + } + + output = &GetResourceDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourceDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a resource definition version, including which +// resources are included in the version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetResourceDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetResourceDefinitionVersion +func (c *Greengrass) GetResourceDefinitionVersion(input *GetResourceDefinitionVersionInput) (*GetResourceDefinitionVersionOutput, error) { + req, out := c.GetResourceDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetResourceDefinitionVersionWithContext is the same as GetResourceDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourceDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetResourceDefinitionVersionWithContext(ctx aws.Context, input *GetResourceDefinitionVersionInput, opts ...request.Option) (*GetResourceDefinitionVersionOutput, error) { + req, out := c.GetResourceDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetServiceRoleForAccount = "GetServiceRoleForAccount" + +// GetServiceRoleForAccountRequest generates a "aws/request.Request" representing the +// client's request for the GetServiceRoleForAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetServiceRoleForAccount for more information on using the GetServiceRoleForAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetServiceRoleForAccountRequest method. +// req, resp := client.GetServiceRoleForAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetServiceRoleForAccount +func (c *Greengrass) GetServiceRoleForAccountRequest(input *GetServiceRoleForAccountInput) (req *request.Request, output *GetServiceRoleForAccountOutput) { + op := &request.Operation{ + Name: opGetServiceRoleForAccount, + HTTPMethod: "GET", + HTTPPath: "/greengrass/servicerole", + } + + if input == nil { + input = &GetServiceRoleForAccountInput{} + } + + output = &GetServiceRoleForAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetServiceRoleForAccount API operation for AWS Greengrass. +// +// Retrieves the service role that is attached to your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetServiceRoleForAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetServiceRoleForAccount +func (c *Greengrass) GetServiceRoleForAccount(input *GetServiceRoleForAccountInput) (*GetServiceRoleForAccountOutput, error) { + req, out := c.GetServiceRoleForAccountRequest(input) + return out, req.Send() +} + +// GetServiceRoleForAccountWithContext is the same as GetServiceRoleForAccount with the addition of +// the ability to pass a context and additional request options. +// +// See GetServiceRoleForAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetServiceRoleForAccountWithContext(ctx aws.Context, input *GetServiceRoleForAccountInput, opts ...request.Option) (*GetServiceRoleForAccountOutput, error) { + req, out := c.GetServiceRoleForAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSubscriptionDefinition = "GetSubscriptionDefinition" + +// GetSubscriptionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetSubscriptionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSubscriptionDefinition for more information on using the GetSubscriptionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSubscriptionDefinitionRequest method. +// req, resp := client.GetSubscriptionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinition +func (c *Greengrass) GetSubscriptionDefinitionRequest(input *GetSubscriptionDefinitionInput) (req *request.Request, output *GetSubscriptionDefinitionOutput) { + op := &request.Operation{ + Name: opGetSubscriptionDefinition, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}", + } + + if input == nil { + input = &GetSubscriptionDefinitionInput{} + } + + output = &GetSubscriptionDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSubscriptionDefinition API operation for AWS Greengrass. +// +// Retrieves information about a subscription definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetSubscriptionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinition +func (c *Greengrass) GetSubscriptionDefinition(input *GetSubscriptionDefinitionInput) (*GetSubscriptionDefinitionOutput, error) { + req, out := c.GetSubscriptionDefinitionRequest(input) + return out, req.Send() +} + +// GetSubscriptionDefinitionWithContext is the same as GetSubscriptionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetSubscriptionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetSubscriptionDefinitionWithContext(ctx aws.Context, input *GetSubscriptionDefinitionInput, opts ...request.Option) (*GetSubscriptionDefinitionOutput, error) { + req, out := c.GetSubscriptionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSubscriptionDefinitionVersion = "GetSubscriptionDefinitionVersion" + +// GetSubscriptionDefinitionVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetSubscriptionDefinitionVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSubscriptionDefinitionVersion for more information on using the GetSubscriptionDefinitionVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSubscriptionDefinitionVersionRequest method. +// req, resp := client.GetSubscriptionDefinitionVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionVersion +func (c *Greengrass) GetSubscriptionDefinitionVersionRequest(input *GetSubscriptionDefinitionVersionInput) (req *request.Request, output *GetSubscriptionDefinitionVersionOutput) { + op := &request.Operation{ + Name: opGetSubscriptionDefinitionVersion, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions/{SubscriptionDefinitionVersionId}", + } + + if input == nil { + input = &GetSubscriptionDefinitionVersionInput{} + } + + output = &GetSubscriptionDefinitionVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSubscriptionDefinitionVersion API operation for AWS Greengrass. +// +// Retrieves information about a subscription definition version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation GetSubscriptionDefinitionVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionVersion +func (c *Greengrass) GetSubscriptionDefinitionVersion(input *GetSubscriptionDefinitionVersionInput) (*GetSubscriptionDefinitionVersionOutput, error) { + req, out := c.GetSubscriptionDefinitionVersionRequest(input) + return out, req.Send() +} + +// GetSubscriptionDefinitionVersionWithContext is the same as GetSubscriptionDefinitionVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetSubscriptionDefinitionVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) GetSubscriptionDefinitionVersionWithContext(ctx aws.Context, input *GetSubscriptionDefinitionVersionInput, opts ...request.Option) (*GetSubscriptionDefinitionVersionOutput, error) { + req, out := c.GetSubscriptionDefinitionVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListBulkDeploymentDetailedReports = "ListBulkDeploymentDetailedReports" + +// ListBulkDeploymentDetailedReportsRequest generates a "aws/request.Request" representing the +// client's request for the ListBulkDeploymentDetailedReports operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBulkDeploymentDetailedReports for more information on using the ListBulkDeploymentDetailedReports +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBulkDeploymentDetailedReportsRequest method. +// req, resp := client.ListBulkDeploymentDetailedReportsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListBulkDeploymentDetailedReports +func (c *Greengrass) ListBulkDeploymentDetailedReportsRequest(input *ListBulkDeploymentDetailedReportsInput) (req *request.Request, output *ListBulkDeploymentDetailedReportsOutput) { + op := &request.Operation{ + Name: opListBulkDeploymentDetailedReports, + HTTPMethod: "GET", + HTTPPath: "/greengrass/bulk/deployments/{BulkDeploymentId}/detailed-reports", + } + + if input == nil { + input = &ListBulkDeploymentDetailedReportsInput{} + } + + output = &ListBulkDeploymentDetailedReportsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBulkDeploymentDetailedReports API operation for AWS Greengrass. +// +// Gets a paginated list of the deployments that have been started in a bulk +// deployment operation, and their current deployment status. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListBulkDeploymentDetailedReports for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListBulkDeploymentDetailedReports +func (c *Greengrass) ListBulkDeploymentDetailedReports(input *ListBulkDeploymentDetailedReportsInput) (*ListBulkDeploymentDetailedReportsOutput, error) { + req, out := c.ListBulkDeploymentDetailedReportsRequest(input) + return out, req.Send() +} + +// ListBulkDeploymentDetailedReportsWithContext is the same as ListBulkDeploymentDetailedReports with the addition of +// the ability to pass a context and additional request options. +// +// See ListBulkDeploymentDetailedReports for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListBulkDeploymentDetailedReportsWithContext(ctx aws.Context, input *ListBulkDeploymentDetailedReportsInput, opts ...request.Option) (*ListBulkDeploymentDetailedReportsOutput, error) { + req, out := c.ListBulkDeploymentDetailedReportsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListBulkDeployments = "ListBulkDeployments" + +// ListBulkDeploymentsRequest generates a "aws/request.Request" representing the +// client's request for the ListBulkDeployments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBulkDeployments for more information on using the ListBulkDeployments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBulkDeploymentsRequest method. +// req, resp := client.ListBulkDeploymentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListBulkDeployments +func (c *Greengrass) ListBulkDeploymentsRequest(input *ListBulkDeploymentsInput) (req *request.Request, output *ListBulkDeploymentsOutput) { + op := &request.Operation{ + Name: opListBulkDeployments, + HTTPMethod: "GET", + HTTPPath: "/greengrass/bulk/deployments", + } + + if input == nil { + input = &ListBulkDeploymentsInput{} + } + + output = &ListBulkDeploymentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBulkDeployments API operation for AWS Greengrass. +// +// Returns a list of bulk deployments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListBulkDeployments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListBulkDeployments +func (c *Greengrass) ListBulkDeployments(input *ListBulkDeploymentsInput) (*ListBulkDeploymentsOutput, error) { + req, out := c.ListBulkDeploymentsRequest(input) + return out, req.Send() +} + +// ListBulkDeploymentsWithContext is the same as ListBulkDeployments with the addition of +// the ability to pass a context and additional request options. +// +// See ListBulkDeployments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListBulkDeploymentsWithContext(ctx aws.Context, input *ListBulkDeploymentsInput, opts ...request.Option) (*ListBulkDeploymentsOutput, error) { + req, out := c.ListBulkDeploymentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListConnectorDefinitionVersions = "ListConnectorDefinitionVersions" + +// ListConnectorDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListConnectorDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListConnectorDefinitionVersions for more information on using the ListConnectorDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListConnectorDefinitionVersionsRequest method. +// req, resp := client.ListConnectorDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListConnectorDefinitionVersions +func (c *Greengrass) ListConnectorDefinitionVersionsRequest(input *ListConnectorDefinitionVersionsInput) (req *request.Request, output *ListConnectorDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListConnectorDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}/versions", + } + + if input == nil { + input = &ListConnectorDefinitionVersionsInput{} + } + + output = &ListConnectorDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListConnectorDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a connector definition, which are containers for connectors. +// Connectors run on the Greengrass core and contain built-in integration with +// local infrastructure, device protocols, AWS, and other cloud services. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListConnectorDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListConnectorDefinitionVersions +func (c *Greengrass) ListConnectorDefinitionVersions(input *ListConnectorDefinitionVersionsInput) (*ListConnectorDefinitionVersionsOutput, error) { + req, out := c.ListConnectorDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListConnectorDefinitionVersionsWithContext is the same as ListConnectorDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListConnectorDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListConnectorDefinitionVersionsWithContext(ctx aws.Context, input *ListConnectorDefinitionVersionsInput, opts ...request.Option) (*ListConnectorDefinitionVersionsOutput, error) { + req, out := c.ListConnectorDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListConnectorDefinitions = "ListConnectorDefinitions" + +// ListConnectorDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListConnectorDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListConnectorDefinitions for more information on using the ListConnectorDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListConnectorDefinitionsRequest method. +// req, resp := client.ListConnectorDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListConnectorDefinitions +func (c *Greengrass) ListConnectorDefinitionsRequest(input *ListConnectorDefinitionsInput) (req *request.Request, output *ListConnectorDefinitionsOutput) { + op := &request.Operation{ + Name: opListConnectorDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/connectors", + } + + if input == nil { + input = &ListConnectorDefinitionsInput{} + } + + output = &ListConnectorDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListConnectorDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of connector definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListConnectorDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListConnectorDefinitions +func (c *Greengrass) ListConnectorDefinitions(input *ListConnectorDefinitionsInput) (*ListConnectorDefinitionsOutput, error) { + req, out := c.ListConnectorDefinitionsRequest(input) + return out, req.Send() +} + +// ListConnectorDefinitionsWithContext is the same as ListConnectorDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListConnectorDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListConnectorDefinitionsWithContext(ctx aws.Context, input *ListConnectorDefinitionsInput, opts ...request.Option) (*ListConnectorDefinitionsOutput, error) { + req, out := c.ListConnectorDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCoreDefinitionVersions = "ListCoreDefinitionVersions" + +// ListCoreDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListCoreDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCoreDefinitionVersions for more information on using the ListCoreDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListCoreDefinitionVersionsRequest method. +// req, resp := client.ListCoreDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionVersions +func (c *Greengrass) ListCoreDefinitionVersionsRequest(input *ListCoreDefinitionVersionsInput) (req *request.Request, output *ListCoreDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListCoreDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}/versions", + } + + if input == nil { + input = &ListCoreDefinitionVersionsInput{} + } + + output = &ListCoreDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCoreDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a core definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListCoreDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionVersions +func (c *Greengrass) ListCoreDefinitionVersions(input *ListCoreDefinitionVersionsInput) (*ListCoreDefinitionVersionsOutput, error) { + req, out := c.ListCoreDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListCoreDefinitionVersionsWithContext is the same as ListCoreDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListCoreDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListCoreDefinitionVersionsWithContext(ctx aws.Context, input *ListCoreDefinitionVersionsInput, opts ...request.Option) (*ListCoreDefinitionVersionsOutput, error) { + req, out := c.ListCoreDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCoreDefinitions = "ListCoreDefinitions" + +// ListCoreDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListCoreDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCoreDefinitions for more information on using the ListCoreDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListCoreDefinitionsRequest method. +// req, resp := client.ListCoreDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitions +func (c *Greengrass) ListCoreDefinitionsRequest(input *ListCoreDefinitionsInput) (req *request.Request, output *ListCoreDefinitionsOutput) { + op := &request.Operation{ + Name: opListCoreDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/cores", + } + + if input == nil { + input = &ListCoreDefinitionsInput{} + } + + output = &ListCoreDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCoreDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of core definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListCoreDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitions +func (c *Greengrass) ListCoreDefinitions(input *ListCoreDefinitionsInput) (*ListCoreDefinitionsOutput, error) { + req, out := c.ListCoreDefinitionsRequest(input) + return out, req.Send() +} + +// ListCoreDefinitionsWithContext is the same as ListCoreDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListCoreDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListCoreDefinitionsWithContext(ctx aws.Context, input *ListCoreDefinitionsInput, opts ...request.Option) (*ListCoreDefinitionsOutput, error) { + req, out := c.ListCoreDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDeployments = "ListDeployments" + +// ListDeploymentsRequest generates a "aws/request.Request" representing the +// client's request for the ListDeployments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDeployments for more information on using the ListDeployments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDeploymentsRequest method. +// req, resp := client.ListDeploymentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeployments +func (c *Greengrass) ListDeploymentsRequest(input *ListDeploymentsInput) (req *request.Request, output *ListDeploymentsOutput) { + op := &request.Operation{ + Name: opListDeployments, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/deployments", + } + + if input == nil { + input = &ListDeploymentsInput{} + } + + output = &ListDeploymentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeployments API operation for AWS Greengrass. +// +// Returns a history of deployments for the 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 Greengrass's +// API operation ListDeployments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeployments +func (c *Greengrass) ListDeployments(input *ListDeploymentsInput) (*ListDeploymentsOutput, error) { + req, out := c.ListDeploymentsRequest(input) + return out, req.Send() +} + +// ListDeploymentsWithContext is the same as ListDeployments with the addition of +// the ability to pass a context and additional request options. +// +// See ListDeployments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListDeploymentsWithContext(ctx aws.Context, input *ListDeploymentsInput, opts ...request.Option) (*ListDeploymentsOutput, error) { + req, out := c.ListDeploymentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDeviceDefinitionVersions = "ListDeviceDefinitionVersions" + +// ListDeviceDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListDeviceDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDeviceDefinitionVersions for more information on using the ListDeviceDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDeviceDefinitionVersionsRequest method. +// req, resp := client.ListDeviceDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionVersions +func (c *Greengrass) ListDeviceDefinitionVersionsRequest(input *ListDeviceDefinitionVersionsInput) (req *request.Request, output *ListDeviceDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListDeviceDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}/versions", + } + + if input == nil { + input = &ListDeviceDefinitionVersionsInput{} + } + + output = &ListDeviceDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeviceDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a device definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListDeviceDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionVersions +func (c *Greengrass) ListDeviceDefinitionVersions(input *ListDeviceDefinitionVersionsInput) (*ListDeviceDefinitionVersionsOutput, error) { + req, out := c.ListDeviceDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListDeviceDefinitionVersionsWithContext is the same as ListDeviceDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListDeviceDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListDeviceDefinitionVersionsWithContext(ctx aws.Context, input *ListDeviceDefinitionVersionsInput, opts ...request.Option) (*ListDeviceDefinitionVersionsOutput, error) { + req, out := c.ListDeviceDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDeviceDefinitions = "ListDeviceDefinitions" + +// ListDeviceDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListDeviceDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDeviceDefinitions for more information on using the ListDeviceDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDeviceDefinitionsRequest method. +// req, resp := client.ListDeviceDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitions +func (c *Greengrass) ListDeviceDefinitionsRequest(input *ListDeviceDefinitionsInput) (req *request.Request, output *ListDeviceDefinitionsOutput) { + op := &request.Operation{ + Name: opListDeviceDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/devices", + } + + if input == nil { + input = &ListDeviceDefinitionsInput{} + } + + output = &ListDeviceDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeviceDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of device definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListDeviceDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitions +func (c *Greengrass) ListDeviceDefinitions(input *ListDeviceDefinitionsInput) (*ListDeviceDefinitionsOutput, error) { + req, out := c.ListDeviceDefinitionsRequest(input) + return out, req.Send() +} + +// ListDeviceDefinitionsWithContext is the same as ListDeviceDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListDeviceDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListDeviceDefinitionsWithContext(ctx aws.Context, input *ListDeviceDefinitionsInput, opts ...request.Option) (*ListDeviceDefinitionsOutput, error) { + req, out := c.ListDeviceDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFunctionDefinitionVersions = "ListFunctionDefinitionVersions" + +// ListFunctionDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListFunctionDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFunctionDefinitionVersions for more information on using the ListFunctionDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFunctionDefinitionVersionsRequest method. +// req, resp := client.ListFunctionDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionVersions +func (c *Greengrass) ListFunctionDefinitionVersionsRequest(input *ListFunctionDefinitionVersionsInput) (req *request.Request, output *ListFunctionDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListFunctionDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}/versions", + } + + if input == nil { + input = &ListFunctionDefinitionVersionsInput{} + } + + output = &ListFunctionDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFunctionDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a Lambda function definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListFunctionDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionVersions +func (c *Greengrass) ListFunctionDefinitionVersions(input *ListFunctionDefinitionVersionsInput) (*ListFunctionDefinitionVersionsOutput, error) { + req, out := c.ListFunctionDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListFunctionDefinitionVersionsWithContext is the same as ListFunctionDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListFunctionDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListFunctionDefinitionVersionsWithContext(ctx aws.Context, input *ListFunctionDefinitionVersionsInput, opts ...request.Option) (*ListFunctionDefinitionVersionsOutput, error) { + req, out := c.ListFunctionDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFunctionDefinitions = "ListFunctionDefinitions" + +// ListFunctionDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListFunctionDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFunctionDefinitions for more information on using the ListFunctionDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFunctionDefinitionsRequest method. +// req, resp := client.ListFunctionDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitions +func (c *Greengrass) ListFunctionDefinitionsRequest(input *ListFunctionDefinitionsInput) (req *request.Request, output *ListFunctionDefinitionsOutput) { + op := &request.Operation{ + Name: opListFunctionDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/functions", + } + + if input == nil { + input = &ListFunctionDefinitionsInput{} + } + + output = &ListFunctionDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFunctionDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of Lambda function definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListFunctionDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitions +func (c *Greengrass) ListFunctionDefinitions(input *ListFunctionDefinitionsInput) (*ListFunctionDefinitionsOutput, error) { + req, out := c.ListFunctionDefinitionsRequest(input) + return out, req.Send() +} + +// ListFunctionDefinitionsWithContext is the same as ListFunctionDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListFunctionDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListFunctionDefinitionsWithContext(ctx aws.Context, input *ListFunctionDefinitionsInput, opts ...request.Option) (*ListFunctionDefinitionsOutput, error) { + req, out := c.ListFunctionDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGroupCertificateAuthorities = "ListGroupCertificateAuthorities" + +// ListGroupCertificateAuthoritiesRequest generates a "aws/request.Request" representing the +// client's request for the ListGroupCertificateAuthorities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGroupCertificateAuthorities for more information on using the ListGroupCertificateAuthorities +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGroupCertificateAuthoritiesRequest method. +// req, resp := client.ListGroupCertificateAuthoritiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupCertificateAuthorities +func (c *Greengrass) ListGroupCertificateAuthoritiesRequest(input *ListGroupCertificateAuthoritiesInput) (req *request.Request, output *ListGroupCertificateAuthoritiesOutput) { + op := &request.Operation{ + Name: opListGroupCertificateAuthorities, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/certificateauthorities", + } + + if input == nil { + input = &ListGroupCertificateAuthoritiesInput{} + } + + output = &ListGroupCertificateAuthoritiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroupCertificateAuthorities API operation for AWS Greengrass. +// +// Retrieves the current CAs for a 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 Greengrass's +// API operation ListGroupCertificateAuthorities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupCertificateAuthorities +func (c *Greengrass) ListGroupCertificateAuthorities(input *ListGroupCertificateAuthoritiesInput) (*ListGroupCertificateAuthoritiesOutput, error) { + req, out := c.ListGroupCertificateAuthoritiesRequest(input) + return out, req.Send() +} + +// ListGroupCertificateAuthoritiesWithContext is the same as ListGroupCertificateAuthorities with the addition of +// the ability to pass a context and additional request options. +// +// See ListGroupCertificateAuthorities for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListGroupCertificateAuthoritiesWithContext(ctx aws.Context, input *ListGroupCertificateAuthoritiesInput, opts ...request.Option) (*ListGroupCertificateAuthoritiesOutput, error) { + req, out := c.ListGroupCertificateAuthoritiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGroupVersions = "ListGroupVersions" + +// ListGroupVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListGroupVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGroupVersions for more information on using the ListGroupVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGroupVersionsRequest method. +// req, resp := client.ListGroupVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupVersions +func (c *Greengrass) ListGroupVersionsRequest(input *ListGroupVersionsInput) (req *request.Request, output *ListGroupVersionsOutput) { + op := &request.Operation{ + Name: opListGroupVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups/{GroupId}/versions", + } + + if input == nil { + input = &ListGroupVersionsInput{} + } + + output = &ListGroupVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroupVersions API operation for AWS Greengrass. +// +// Lists the versions of a 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 Greengrass's +// API operation ListGroupVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupVersions +func (c *Greengrass) ListGroupVersions(input *ListGroupVersionsInput) (*ListGroupVersionsOutput, error) { + req, out := c.ListGroupVersionsRequest(input) + return out, req.Send() +} + +// ListGroupVersionsWithContext is the same as ListGroupVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListGroupVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListGroupVersionsWithContext(ctx aws.Context, input *ListGroupVersionsInput, opts ...request.Option) (*ListGroupVersionsOutput, error) { + req, out := c.ListGroupVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGroups = "ListGroups" + +// ListGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGroups for more information on using the ListGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGroupsRequest method. +// req, resp := client.ListGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroups +func (c *Greengrass) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { + op := &request.Operation{ + Name: opListGroups, + HTTPMethod: "GET", + HTTPPath: "/greengrass/groups", + } + + if input == nil { + input = &ListGroupsInput{} + } + + output = &ListGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroups API operation for AWS Greengrass. +// +// Retrieves a list of groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListGroups for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroups +func (c *Greengrass) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) + return out, req.Send() +} + +// ListGroupsWithContext is the same as ListGroups with the addition of +// the ability to pass a context and additional request options. +// +// See ListGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListLoggerDefinitionVersions = "ListLoggerDefinitionVersions" + +// ListLoggerDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggerDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggerDefinitionVersions for more information on using the ListLoggerDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggerDefinitionVersionsRequest method. +// req, resp := client.ListLoggerDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionVersions +func (c *Greengrass) ListLoggerDefinitionVersionsRequest(input *ListLoggerDefinitionVersionsInput) (req *request.Request, output *ListLoggerDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListLoggerDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}/versions", + } + + if input == nil { + input = &ListLoggerDefinitionVersionsInput{} + } + + output = &ListLoggerDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggerDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a logger definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListLoggerDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionVersions +func (c *Greengrass) ListLoggerDefinitionVersions(input *ListLoggerDefinitionVersionsInput) (*ListLoggerDefinitionVersionsOutput, error) { + req, out := c.ListLoggerDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListLoggerDefinitionVersionsWithContext is the same as ListLoggerDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggerDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListLoggerDefinitionVersionsWithContext(ctx aws.Context, input *ListLoggerDefinitionVersionsInput, opts ...request.Option) (*ListLoggerDefinitionVersionsOutput, error) { + req, out := c.ListLoggerDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListLoggerDefinitions = "ListLoggerDefinitions" + +// ListLoggerDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggerDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggerDefinitions for more information on using the ListLoggerDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggerDefinitionsRequest method. +// req, resp := client.ListLoggerDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitions +func (c *Greengrass) ListLoggerDefinitionsRequest(input *ListLoggerDefinitionsInput) (req *request.Request, output *ListLoggerDefinitionsOutput) { + op := &request.Operation{ + Name: opListLoggerDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/loggers", + } + + if input == nil { + input = &ListLoggerDefinitionsInput{} + } + + output = &ListLoggerDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggerDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of logger definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListLoggerDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitions +func (c *Greengrass) ListLoggerDefinitions(input *ListLoggerDefinitionsInput) (*ListLoggerDefinitionsOutput, error) { + req, out := c.ListLoggerDefinitionsRequest(input) + return out, req.Send() +} + +// ListLoggerDefinitionsWithContext is the same as ListLoggerDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggerDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListLoggerDefinitionsWithContext(ctx aws.Context, input *ListLoggerDefinitionsInput, opts ...request.Option) (*ListLoggerDefinitionsOutput, error) { + req, out := c.ListLoggerDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResourceDefinitionVersions = "ListResourceDefinitionVersions" + +// ListResourceDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListResourceDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResourceDefinitionVersions for more information on using the ListResourceDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourceDefinitionVersionsRequest method. +// req, resp := client.ListResourceDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListResourceDefinitionVersions +func (c *Greengrass) ListResourceDefinitionVersionsRequest(input *ListResourceDefinitionVersionsInput) (req *request.Request, output *ListResourceDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListResourceDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}/versions", + } + + if input == nil { + input = &ListResourceDefinitionVersionsInput{} + } + + output = &ListResourceDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResourceDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a resource definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListResourceDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListResourceDefinitionVersions +func (c *Greengrass) ListResourceDefinitionVersions(input *ListResourceDefinitionVersionsInput) (*ListResourceDefinitionVersionsOutput, error) { + req, out := c.ListResourceDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListResourceDefinitionVersionsWithContext is the same as ListResourceDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListResourceDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListResourceDefinitionVersionsWithContext(ctx aws.Context, input *ListResourceDefinitionVersionsInput, opts ...request.Option) (*ListResourceDefinitionVersionsOutput, error) { + req, out := c.ListResourceDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResourceDefinitions = "ListResourceDefinitions" + +// ListResourceDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListResourceDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResourceDefinitions for more information on using the ListResourceDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourceDefinitionsRequest method. +// req, resp := client.ListResourceDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListResourceDefinitions +func (c *Greengrass) ListResourceDefinitionsRequest(input *ListResourceDefinitionsInput) (req *request.Request, output *ListResourceDefinitionsOutput) { + op := &request.Operation{ + Name: opListResourceDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/resources", + } + + if input == nil { + input = &ListResourceDefinitionsInput{} + } + + output = &ListResourceDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResourceDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of resource definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListResourceDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListResourceDefinitions +func (c *Greengrass) ListResourceDefinitions(input *ListResourceDefinitionsInput) (*ListResourceDefinitionsOutput, error) { + req, out := c.ListResourceDefinitionsRequest(input) + return out, req.Send() +} + +// ListResourceDefinitionsWithContext is the same as ListResourceDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListResourceDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListResourceDefinitionsWithContext(ctx aws.Context, input *ListResourceDefinitionsInput, opts ...request.Option) (*ListResourceDefinitionsOutput, error) { + req, out := c.ListResourceDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSubscriptionDefinitionVersions = "ListSubscriptionDefinitionVersions" + +// ListSubscriptionDefinitionVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListSubscriptionDefinitionVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSubscriptionDefinitionVersions for more information on using the ListSubscriptionDefinitionVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSubscriptionDefinitionVersionsRequest method. +// req, resp := client.ListSubscriptionDefinitionVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionVersions +func (c *Greengrass) ListSubscriptionDefinitionVersionsRequest(input *ListSubscriptionDefinitionVersionsInput) (req *request.Request, output *ListSubscriptionDefinitionVersionsOutput) { + op := &request.Operation{ + Name: opListSubscriptionDefinitionVersions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions", + } + + if input == nil { + input = &ListSubscriptionDefinitionVersionsInput{} + } + + output = &ListSubscriptionDefinitionVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSubscriptionDefinitionVersions API operation for AWS Greengrass. +// +// Lists the versions of a subscription definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListSubscriptionDefinitionVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionVersions +func (c *Greengrass) ListSubscriptionDefinitionVersions(input *ListSubscriptionDefinitionVersionsInput) (*ListSubscriptionDefinitionVersionsOutput, error) { + req, out := c.ListSubscriptionDefinitionVersionsRequest(input) + return out, req.Send() +} + +// ListSubscriptionDefinitionVersionsWithContext is the same as ListSubscriptionDefinitionVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListSubscriptionDefinitionVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListSubscriptionDefinitionVersionsWithContext(ctx aws.Context, input *ListSubscriptionDefinitionVersionsInput, opts ...request.Option) (*ListSubscriptionDefinitionVersionsOutput, error) { + req, out := c.ListSubscriptionDefinitionVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSubscriptionDefinitions = "ListSubscriptionDefinitions" + +// ListSubscriptionDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the ListSubscriptionDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSubscriptionDefinitions for more information on using the ListSubscriptionDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSubscriptionDefinitionsRequest method. +// req, resp := client.ListSubscriptionDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitions +func (c *Greengrass) ListSubscriptionDefinitionsRequest(input *ListSubscriptionDefinitionsInput) (req *request.Request, output *ListSubscriptionDefinitionsOutput) { + op := &request.Operation{ + Name: opListSubscriptionDefinitions, + HTTPMethod: "GET", + HTTPPath: "/greengrass/definition/subscriptions", + } + + if input == nil { + input = &ListSubscriptionDefinitionsInput{} + } + + output = &ListSubscriptionDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSubscriptionDefinitions API operation for AWS Greengrass. +// +// Retrieves a list of subscription definitions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListSubscriptionDefinitions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitions +func (c *Greengrass) ListSubscriptionDefinitions(input *ListSubscriptionDefinitionsInput) (*ListSubscriptionDefinitionsOutput, error) { + req, out := c.ListSubscriptionDefinitionsRequest(input) + return out, req.Send() +} + +// ListSubscriptionDefinitionsWithContext is the same as ListSubscriptionDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See ListSubscriptionDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ListSubscriptionDefinitionsWithContext(ctx aws.Context, input *ListSubscriptionDefinitionsInput, opts ...request.Option) (*ListSubscriptionDefinitionsOutput, error) { + req, out := c.ListSubscriptionDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the 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/greengrass-2017-06-07/ListTagsForResource +func (c *Greengrass) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resource-arn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Greengrass. +// +// Retrieves a list of resource tags for a resource arn. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListTagsForResource +func (c *Greengrass) 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 *Greengrass) 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 opResetDeployments = "ResetDeployments" + +// ResetDeploymentsRequest generates a "aws/request.Request" representing the +// client's request for the ResetDeployments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResetDeployments for more information on using the ResetDeployments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResetDeploymentsRequest method. +// req, resp := client.ResetDeploymentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ResetDeployments +func (c *Greengrass) ResetDeploymentsRequest(input *ResetDeploymentsInput) (req *request.Request, output *ResetDeploymentsOutput) { + op := &request.Operation{ + Name: opResetDeployments, + HTTPMethod: "POST", + HTTPPath: "/greengrass/groups/{GroupId}/deployments/$reset", + } + + if input == nil { + input = &ResetDeploymentsInput{} + } + + output = &ResetDeploymentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetDeployments API operation for AWS Greengrass. +// +// Resets a group's deployments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation ResetDeployments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ResetDeployments +func (c *Greengrass) ResetDeployments(input *ResetDeploymentsInput) (*ResetDeploymentsOutput, error) { + req, out := c.ResetDeploymentsRequest(input) + return out, req.Send() +} + +// ResetDeploymentsWithContext is the same as ResetDeployments with the addition of +// the ability to pass a context and additional request options. +// +// See ResetDeployments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) ResetDeploymentsWithContext(ctx aws.Context, input *ResetDeploymentsInput, opts ...request.Option) (*ResetDeploymentsOutput, error) { + req, out := c.ResetDeploymentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartBulkDeployment = "StartBulkDeployment" + +// StartBulkDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the StartBulkDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartBulkDeployment for more information on using the StartBulkDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartBulkDeploymentRequest method. +// req, resp := client.StartBulkDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/StartBulkDeployment +func (c *Greengrass) StartBulkDeploymentRequest(input *StartBulkDeploymentInput) (req *request.Request, output *StartBulkDeploymentOutput) { + op := &request.Operation{ + Name: opStartBulkDeployment, + HTTPMethod: "POST", + HTTPPath: "/greengrass/bulk/deployments", + } + + if input == nil { + input = &StartBulkDeploymentInput{} + } + + output = &StartBulkDeploymentOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartBulkDeployment API operation for AWS Greengrass. +// +// Deploys multiple groups in one operation. This action starts the bulk deployment +// of a specified set of group versions. Each group version deployment will +// be triggered with an adaptive rate that has a fixed upper limit. We recommend +// that you include an ''X-Amzn-Client-Token'' token in every ''StartBulkDeployment'' +// request. These requests are idempotent with respect to the token and the +// request 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 AWS Greengrass's +// API operation StartBulkDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/StartBulkDeployment +func (c *Greengrass) StartBulkDeployment(input *StartBulkDeploymentInput) (*StartBulkDeploymentOutput, error) { + req, out := c.StartBulkDeploymentRequest(input) + return out, req.Send() +} + +// StartBulkDeploymentWithContext is the same as StartBulkDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See StartBulkDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) StartBulkDeploymentWithContext(ctx aws.Context, input *StartBulkDeploymentInput, opts ...request.Option) (*StartBulkDeploymentOutput, error) { + req, out := c.StartBulkDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopBulkDeployment = "StopBulkDeployment" + +// StopBulkDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the StopBulkDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopBulkDeployment for more information on using the StopBulkDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopBulkDeploymentRequest method. +// req, resp := client.StopBulkDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/StopBulkDeployment +func (c *Greengrass) StopBulkDeploymentRequest(input *StopBulkDeploymentInput) (req *request.Request, output *StopBulkDeploymentOutput) { + op := &request.Operation{ + Name: opStopBulkDeployment, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/bulk/deployments/{BulkDeploymentId}/$stop", + } + + if input == nil { + input = &StopBulkDeploymentInput{} + } + + output = &StopBulkDeploymentOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopBulkDeployment API operation for AWS Greengrass. +// +// Stops the execution of a bulk deployment. This action returns a status of +// ''Stopping'' until the deployment is stopped. You cannot start a new bulk +// deployment while a previous deployment is in the ''Stopping'' state. This +// action doesn't rollback completed deployments or cancel pending deployments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation StopBulkDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/StopBulkDeployment +func (c *Greengrass) StopBulkDeployment(input *StopBulkDeploymentInput) (*StopBulkDeploymentOutput, error) { + req, out := c.StopBulkDeploymentRequest(input) + return out, req.Send() +} + +// StopBulkDeploymentWithContext is the same as StopBulkDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See StopBulkDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) StopBulkDeploymentWithContext(ctx aws.Context, input *StopBulkDeploymentInput, opts ...request.Option) (*StopBulkDeploymentOutput, error) { + req, out := c.StopBulkDeploymentRequest(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/greengrass-2017-06-07/TagResource +func (c *Greengrass) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resource-arn}", + } + + 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 Greengrass. +// +// Adds tags to a Greengrass resource. Valid resources are 'Group', 'ConnectorDefinition', +// 'CoreDefinition', 'DeviceDefinition', 'FunctionDefinition', 'LoggerDefinition', +// 'SubscriptionDefinition', 'ResourceDefinition', and 'BulkDeployment'. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/TagResource +func (c *Greengrass) 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 *Greengrass) 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/greengrass-2017-06-07/UntagResource +func (c *Greengrass) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resource-arn}", + } + + 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 Greengrass. +// +// Remove resource tags from a Greengrass 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 Greengrass's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UntagResource +func (c *Greengrass) 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 *Greengrass) 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 opUpdateConnectivityInfo = "UpdateConnectivityInfo" + +// UpdateConnectivityInfoRequest generates a "aws/request.Request" representing the +// client's request for the UpdateConnectivityInfo operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateConnectivityInfo for more information on using the UpdateConnectivityInfo +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateConnectivityInfoRequest method. +// req, resp := client.UpdateConnectivityInfoRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectivityInfo +func (c *Greengrass) UpdateConnectivityInfoRequest(input *UpdateConnectivityInfoInput) (req *request.Request, output *UpdateConnectivityInfoOutput) { + op := &request.Operation{ + Name: opUpdateConnectivityInfo, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/things/{ThingName}/connectivityInfo", + } + + if input == nil { + input = &UpdateConnectivityInfoInput{} + } + + output = &UpdateConnectivityInfoOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateConnectivityInfo API operation for AWS Greengrass. +// +// Updates the connectivity information for the core. Any devices that belong +// to the group which has this core will receive this information in order to +// find the location of the core and connect to it. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateConnectivityInfo for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectivityInfo +func (c *Greengrass) UpdateConnectivityInfo(input *UpdateConnectivityInfoInput) (*UpdateConnectivityInfoOutput, error) { + req, out := c.UpdateConnectivityInfoRequest(input) + return out, req.Send() +} + +// UpdateConnectivityInfoWithContext is the same as UpdateConnectivityInfo with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateConnectivityInfo for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateConnectivityInfoWithContext(ctx aws.Context, input *UpdateConnectivityInfoInput, opts ...request.Option) (*UpdateConnectivityInfoOutput, error) { + req, out := c.UpdateConnectivityInfoRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateConnectorDefinition = "UpdateConnectorDefinition" + +// UpdateConnectorDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateConnectorDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateConnectorDefinition for more information on using the UpdateConnectorDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateConnectorDefinitionRequest method. +// req, resp := client.UpdateConnectorDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectorDefinition +func (c *Greengrass) UpdateConnectorDefinitionRequest(input *UpdateConnectorDefinitionInput) (req *request.Request, output *UpdateConnectorDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateConnectorDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}", + } + + if input == nil { + input = &UpdateConnectorDefinitionInput{} + } + + output = &UpdateConnectorDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateConnectorDefinition API operation for AWS Greengrass. +// +// Updates a connector definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateConnectorDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectorDefinition +func (c *Greengrass) UpdateConnectorDefinition(input *UpdateConnectorDefinitionInput) (*UpdateConnectorDefinitionOutput, error) { + req, out := c.UpdateConnectorDefinitionRequest(input) + return out, req.Send() +} + +// UpdateConnectorDefinitionWithContext is the same as UpdateConnectorDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateConnectorDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateConnectorDefinitionWithContext(ctx aws.Context, input *UpdateConnectorDefinitionInput, opts ...request.Option) (*UpdateConnectorDefinitionOutput, error) { + req, out := c.UpdateConnectorDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCoreDefinition = "UpdateCoreDefinition" + +// UpdateCoreDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCoreDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCoreDefinition for more information on using the UpdateCoreDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCoreDefinitionRequest method. +// req, resp := client.UpdateCoreDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateCoreDefinition +func (c *Greengrass) UpdateCoreDefinitionRequest(input *UpdateCoreDefinitionInput) (req *request.Request, output *UpdateCoreDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateCoreDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/cores/{CoreDefinitionId}", + } + + if input == nil { + input = &UpdateCoreDefinitionInput{} + } + + output = &UpdateCoreDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCoreDefinition API operation for AWS Greengrass. +// +// Updates a core definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateCoreDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateCoreDefinition +func (c *Greengrass) UpdateCoreDefinition(input *UpdateCoreDefinitionInput) (*UpdateCoreDefinitionOutput, error) { + req, out := c.UpdateCoreDefinitionRequest(input) + return out, req.Send() +} + +// UpdateCoreDefinitionWithContext is the same as UpdateCoreDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCoreDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateCoreDefinitionWithContext(ctx aws.Context, input *UpdateCoreDefinitionInput, opts ...request.Option) (*UpdateCoreDefinitionOutput, error) { + req, out := c.UpdateCoreDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDeviceDefinition = "UpdateDeviceDefinition" + +// UpdateDeviceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDeviceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDeviceDefinition for more information on using the UpdateDeviceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDeviceDefinitionRequest method. +// req, resp := client.UpdateDeviceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateDeviceDefinition +func (c *Greengrass) UpdateDeviceDefinitionRequest(input *UpdateDeviceDefinitionInput) (req *request.Request, output *UpdateDeviceDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateDeviceDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/devices/{DeviceDefinitionId}", + } + + if input == nil { + input = &UpdateDeviceDefinitionInput{} + } + + output = &UpdateDeviceDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateDeviceDefinition API operation for AWS Greengrass. +// +// Updates a device definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateDeviceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateDeviceDefinition +func (c *Greengrass) UpdateDeviceDefinition(input *UpdateDeviceDefinitionInput) (*UpdateDeviceDefinitionOutput, error) { + req, out := c.UpdateDeviceDefinitionRequest(input) + return out, req.Send() +} + +// UpdateDeviceDefinitionWithContext is the same as UpdateDeviceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDeviceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateDeviceDefinitionWithContext(ctx aws.Context, input *UpdateDeviceDefinitionInput, opts ...request.Option) (*UpdateDeviceDefinitionOutput, error) { + req, out := c.UpdateDeviceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFunctionDefinition = "UpdateFunctionDefinition" + +// UpdateFunctionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFunctionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFunctionDefinition for more information on using the UpdateFunctionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFunctionDefinitionRequest method. +// req, resp := client.UpdateFunctionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateFunctionDefinition +func (c *Greengrass) UpdateFunctionDefinitionRequest(input *UpdateFunctionDefinitionInput) (req *request.Request, output *UpdateFunctionDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateFunctionDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/functions/{FunctionDefinitionId}", + } + + if input == nil { + input = &UpdateFunctionDefinitionInput{} + } + + output = &UpdateFunctionDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateFunctionDefinition API operation for AWS Greengrass. +// +// Updates a Lambda function definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateFunctionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateFunctionDefinition +func (c *Greengrass) UpdateFunctionDefinition(input *UpdateFunctionDefinitionInput) (*UpdateFunctionDefinitionOutput, error) { + req, out := c.UpdateFunctionDefinitionRequest(input) + return out, req.Send() +} + +// UpdateFunctionDefinitionWithContext is the same as UpdateFunctionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFunctionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateFunctionDefinitionWithContext(ctx aws.Context, input *UpdateFunctionDefinitionInput, opts ...request.Option) (*UpdateFunctionDefinitionOutput, error) { + req, out := c.UpdateFunctionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGroup = "UpdateGroup" + +// UpdateGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGroup for more information on using the UpdateGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGroupRequest method. +// req, resp := client.UpdateGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroup +func (c *Greengrass) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { + op := &request.Operation{ + Name: opUpdateGroup, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/groups/{GroupId}", + } + + if input == nil { + input = &UpdateGroupInput{} + } + + output = &UpdateGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateGroup API operation for AWS Greengrass. +// +// Updates a 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 Greengrass's +// API operation UpdateGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroup +func (c *Greengrass) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) { + req, out := c.UpdateGroupRequest(input) + return out, req.Send() +} + +// UpdateGroupWithContext is the same as UpdateGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) { + req, out := c.UpdateGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGroupCertificateConfiguration = "UpdateGroupCertificateConfiguration" + +// UpdateGroupCertificateConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGroupCertificateConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGroupCertificateConfiguration for more information on using the UpdateGroupCertificateConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGroupCertificateConfigurationRequest method. +// req, resp := client.UpdateGroupCertificateConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupCertificateConfiguration +func (c *Greengrass) UpdateGroupCertificateConfigurationRequest(input *UpdateGroupCertificateConfigurationInput) (req *request.Request, output *UpdateGroupCertificateConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateGroupCertificateConfiguration, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry", + } + + if input == nil { + input = &UpdateGroupCertificateConfigurationInput{} + } + + output = &UpdateGroupCertificateConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGroupCertificateConfiguration API operation for AWS Greengrass. +// +// Updates the Certificate expiry time for a 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 Greengrass's +// API operation UpdateGroupCertificateConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupCertificateConfiguration +func (c *Greengrass) UpdateGroupCertificateConfiguration(input *UpdateGroupCertificateConfigurationInput) (*UpdateGroupCertificateConfigurationOutput, error) { + req, out := c.UpdateGroupCertificateConfigurationRequest(input) + return out, req.Send() +} + +// UpdateGroupCertificateConfigurationWithContext is the same as UpdateGroupCertificateConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGroupCertificateConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateGroupCertificateConfigurationWithContext(ctx aws.Context, input *UpdateGroupCertificateConfigurationInput, opts ...request.Option) (*UpdateGroupCertificateConfigurationOutput, error) { + req, out := c.UpdateGroupCertificateConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLoggerDefinition = "UpdateLoggerDefinition" + +// UpdateLoggerDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLoggerDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLoggerDefinition for more information on using the UpdateLoggerDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLoggerDefinitionRequest method. +// req, resp := client.UpdateLoggerDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateLoggerDefinition +func (c *Greengrass) UpdateLoggerDefinitionRequest(input *UpdateLoggerDefinitionInput) (req *request.Request, output *UpdateLoggerDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateLoggerDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/loggers/{LoggerDefinitionId}", + } + + if input == nil { + input = &UpdateLoggerDefinitionInput{} + } + + output = &UpdateLoggerDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateLoggerDefinition API operation for AWS Greengrass. +// +// Updates a logger definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateLoggerDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateLoggerDefinition +func (c *Greengrass) UpdateLoggerDefinition(input *UpdateLoggerDefinitionInput) (*UpdateLoggerDefinitionOutput, error) { + req, out := c.UpdateLoggerDefinitionRequest(input) + return out, req.Send() +} + +// UpdateLoggerDefinitionWithContext is the same as UpdateLoggerDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLoggerDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateLoggerDefinitionWithContext(ctx aws.Context, input *UpdateLoggerDefinitionInput, opts ...request.Option) (*UpdateLoggerDefinitionOutput, error) { + req, out := c.UpdateLoggerDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateResourceDefinition = "UpdateResourceDefinition" + +// UpdateResourceDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResourceDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResourceDefinition for more information on using the UpdateResourceDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResourceDefinitionRequest method. +// req, resp := client.UpdateResourceDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateResourceDefinition +func (c *Greengrass) UpdateResourceDefinitionRequest(input *UpdateResourceDefinitionInput) (req *request.Request, output *UpdateResourceDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateResourceDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/resources/{ResourceDefinitionId}", + } + + if input == nil { + input = &UpdateResourceDefinitionInput{} + } + + output = &UpdateResourceDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateResourceDefinition API operation for AWS Greengrass. +// +// Updates a resource definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateResourceDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateResourceDefinition +func (c *Greengrass) UpdateResourceDefinition(input *UpdateResourceDefinitionInput) (*UpdateResourceDefinitionOutput, error) { + req, out := c.UpdateResourceDefinitionRequest(input) + return out, req.Send() +} + +// UpdateResourceDefinitionWithContext is the same as UpdateResourceDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResourceDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateResourceDefinitionWithContext(ctx aws.Context, input *UpdateResourceDefinitionInput, opts ...request.Option) (*UpdateResourceDefinitionOutput, error) { + req, out := c.UpdateResourceDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSubscriptionDefinition = "UpdateSubscriptionDefinition" + +// UpdateSubscriptionDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSubscriptionDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSubscriptionDefinition for more information on using the UpdateSubscriptionDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSubscriptionDefinitionRequest method. +// req, resp := client.UpdateSubscriptionDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateSubscriptionDefinition +func (c *Greengrass) UpdateSubscriptionDefinitionRequest(input *UpdateSubscriptionDefinitionInput) (req *request.Request, output *UpdateSubscriptionDefinitionOutput) { + op := &request.Operation{ + Name: opUpdateSubscriptionDefinition, + HTTPMethod: "PUT", + HTTPPath: "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}", + } + + if input == nil { + input = &UpdateSubscriptionDefinitionInput{} + } + + output = &UpdateSubscriptionDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateSubscriptionDefinition API operation for AWS Greengrass. +// +// Updates a subscription definition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Greengrass's +// API operation UpdateSubscriptionDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// General error information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateSubscriptionDefinition +func (c *Greengrass) UpdateSubscriptionDefinition(input *UpdateSubscriptionDefinitionInput) (*UpdateSubscriptionDefinitionOutput, error) { + req, out := c.UpdateSubscriptionDefinitionRequest(input) + return out, req.Send() +} + +// UpdateSubscriptionDefinitionWithContext is the same as UpdateSubscriptionDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSubscriptionDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Greengrass) UpdateSubscriptionDefinitionWithContext(ctx aws.Context, input *UpdateSubscriptionDefinitionInput, opts ...request.Option) (*UpdateSubscriptionDefinitionOutput, error) { + req, out := c.UpdateSubscriptionDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateRoleToGroupInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + // The ARN of the role you wish to associate with this group. The existence + // of the role is not validated. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateRoleToGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateRoleToGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateRoleToGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateRoleToGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *AssociateRoleToGroupInput) SetGroupId(v string) *AssociateRoleToGroupInput { + s.GroupId = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AssociateRoleToGroupInput) SetRoleArn(v string) *AssociateRoleToGroupInput { + s.RoleArn = &v + return s +} + +type AssociateRoleToGroupOutput struct { + _ struct{} `type:"structure"` + + // The time, in milliseconds since the epoch, when the role ARN was associated + // with the group. + AssociatedAt *string `type:"string"` +} + +// String returns the string representation +func (s AssociateRoleToGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateRoleToGroupOutput) GoString() string { + return s.String() +} + +// SetAssociatedAt sets the AssociatedAt field's value. +func (s *AssociateRoleToGroupOutput) SetAssociatedAt(v string) *AssociateRoleToGroupOutput { + s.AssociatedAt = &v + return s +} + +type AssociateServiceRoleToAccountInput struct { + _ struct{} `type:"structure"` + + // The ARN of the service role you wish to associate with your account. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateServiceRoleToAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceRoleToAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateServiceRoleToAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateServiceRoleToAccountInput"} + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AssociateServiceRoleToAccountInput) SetRoleArn(v string) *AssociateServiceRoleToAccountInput { + s.RoleArn = &v + return s +} + +type AssociateServiceRoleToAccountOutput struct { + _ struct{} `type:"structure"` + + // The time when the service role was associated with the account. + AssociatedAt *string `type:"string"` +} + +// String returns the string representation +func (s AssociateServiceRoleToAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceRoleToAccountOutput) GoString() string { + return s.String() +} + +// SetAssociatedAt sets the AssociatedAt field's value. +func (s *AssociateServiceRoleToAccountOutput) SetAssociatedAt(v string) *AssociateServiceRoleToAccountOutput { + s.AssociatedAt = &v + return s +} + +// Information about a bulk deployment. You cannot start a new bulk deployment +// while another one is still running or in a non-terminal state. +type BulkDeployment struct { + _ struct{} `type:"structure"` + + // The ARN of the bulk deployment. + BulkDeploymentArn *string `type:"string"` + + // The ID of the bulk deployment. + BulkDeploymentId *string `type:"string"` + + // The time, in ISO format, when the deployment was created. + CreatedAt *string `type:"string"` +} + +// String returns the string representation +func (s BulkDeployment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BulkDeployment) GoString() string { + return s.String() +} + +// SetBulkDeploymentArn sets the BulkDeploymentArn field's value. +func (s *BulkDeployment) SetBulkDeploymentArn(v string) *BulkDeployment { + s.BulkDeploymentArn = &v + return s +} + +// SetBulkDeploymentId sets the BulkDeploymentId field's value. +func (s *BulkDeployment) SetBulkDeploymentId(v string) *BulkDeployment { + s.BulkDeploymentId = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *BulkDeployment) SetCreatedAt(v string) *BulkDeployment { + s.CreatedAt = &v + return s +} + +// Relevant metrics on input records processed during bulk deployment. +type BulkDeploymentMetrics struct { + _ struct{} `type:"structure"` + + // The total number of records that returned a non-retryable error. For example, + // this can occur if a group record from the input file uses an invalid format + // or specifies a nonexistent group version, or if the execution role doesn't + // grant permission to deploy a group or group version. + InvalidInputRecords *int64 `type:"integer"` + + // The total number of group records from the input file that have been processed + // so far, or attempted. + RecordsProcessed *int64 `type:"integer"` + + // The total number of deployment attempts that returned a retryable error. + // For example, a retry is triggered if the attempt to deploy a group returns + // a throttling error. ''StartBulkDeployment'' retries a group deployment up + // to five times. + RetryAttempts *int64 `type:"integer"` +} + +// String returns the string representation +func (s BulkDeploymentMetrics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BulkDeploymentMetrics) GoString() string { + return s.String() +} + +// SetInvalidInputRecords sets the InvalidInputRecords field's value. +func (s *BulkDeploymentMetrics) SetInvalidInputRecords(v int64) *BulkDeploymentMetrics { + s.InvalidInputRecords = &v + return s +} + +// SetRecordsProcessed sets the RecordsProcessed field's value. +func (s *BulkDeploymentMetrics) SetRecordsProcessed(v int64) *BulkDeploymentMetrics { + s.RecordsProcessed = &v + return s +} + +// SetRetryAttempts sets the RetryAttempts field's value. +func (s *BulkDeploymentMetrics) SetRetryAttempts(v int64) *BulkDeploymentMetrics { + s.RetryAttempts = &v + return s +} + +// Information about an individual group deployment in a bulk deployment operation. +type BulkDeploymentResult struct { + _ struct{} `type:"structure"` + + // The time, in ISO format, when the deployment was created. + CreatedAt *string `type:"string"` + + // The ARN of the group deployment. + DeploymentArn *string `type:"string"` + + // The ID of the group deployment. + DeploymentId *string `type:"string"` + + // The current status of the group deployment: ''InProgress'', ''Building'', + // ''Success'', or ''Failure''. + DeploymentStatus *string `type:"string"` + + // The type of the deployment. + DeploymentType *string `type:"string" enum:"DeploymentType"` + + // Details about the error. + ErrorDetails []*ErrorDetail `type:"list"` + + // The error message for a failed deployment + ErrorMessage *string `type:"string"` + + // The ARN of the Greengrass group. + GroupArn *string `type:"string"` +} + +// String returns the string representation +func (s BulkDeploymentResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BulkDeploymentResult) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *BulkDeploymentResult) SetCreatedAt(v string) *BulkDeploymentResult { + s.CreatedAt = &v + return s +} + +// SetDeploymentArn sets the DeploymentArn field's value. +func (s *BulkDeploymentResult) SetDeploymentArn(v string) *BulkDeploymentResult { + s.DeploymentArn = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *BulkDeploymentResult) SetDeploymentId(v string) *BulkDeploymentResult { + s.DeploymentId = &v + return s +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *BulkDeploymentResult) SetDeploymentStatus(v string) *BulkDeploymentResult { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentType sets the DeploymentType field's value. +func (s *BulkDeploymentResult) SetDeploymentType(v string) *BulkDeploymentResult { + s.DeploymentType = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *BulkDeploymentResult) SetErrorDetails(v []*ErrorDetail) *BulkDeploymentResult { + s.ErrorDetails = v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *BulkDeploymentResult) SetErrorMessage(v string) *BulkDeploymentResult { + s.ErrorMessage = &v + return s +} + +// SetGroupArn sets the GroupArn field's value. +func (s *BulkDeploymentResult) SetGroupArn(v string) *BulkDeploymentResult { + s.GroupArn = &v + return s +} + +// Information about a Greengrass core's connectivity. +type ConnectivityInfo struct { + _ struct{} `type:"structure"` + + // The endpoint for the Greengrass core. Can be an IP address or DNS. + HostAddress *string `type:"string"` + + // The ID of the connectivity information. + Id *string `type:"string"` + + // Metadata for this endpoint. + Metadata *string `type:"string"` + + // The port of the Greengrass core. Usually 8883. + PortNumber *int64 `type:"integer"` +} + +// String returns the string representation +func (s ConnectivityInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectivityInfo) GoString() string { + return s.String() +} + +// SetHostAddress sets the HostAddress field's value. +func (s *ConnectivityInfo) SetHostAddress(v string) *ConnectivityInfo { + s.HostAddress = &v + return s +} + +// SetId sets the Id field's value. +func (s *ConnectivityInfo) SetId(v string) *ConnectivityInfo { + s.Id = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *ConnectivityInfo) SetMetadata(v string) *ConnectivityInfo { + s.Metadata = &v + return s +} + +// SetPortNumber sets the PortNumber field's value. +func (s *ConnectivityInfo) SetPortNumber(v int64) *ConnectivityInfo { + s.PortNumber = &v + return s +} + +// Information about a connector. Connectors run on the Greengrass core and +// contain built-in integration with local infrastructure, device protocols, +// AWS, and other cloud services. +type Connector struct { + _ struct{} `type:"structure"` + + // The ARN of the connector. + // + // ConnectorArn is a required field + ConnectorArn *string `type:"string" required:"true"` + + // A descriptive or arbitrary ID for the connector. This value must be unique + // within the connector definition version. Max length is 128 characters with + // pattern [a-zA-Z0-9:_-]+. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The parameters or configuration that the connector uses. + Parameters map[string]*string `type:"map"` +} + +// String returns the string representation +func (s Connector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Connector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Connector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Connector"} + if s.ConnectorArn == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorArn")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorArn sets the ConnectorArn field's value. +func (s *Connector) SetConnectorArn(v string) *Connector { + s.ConnectorArn = &v + return s +} + +// SetId sets the Id field's value. +func (s *Connector) SetId(v string) *Connector { + s.Id = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *Connector) SetParameters(v map[string]*string) *Connector { + s.Parameters = v + return s +} + +// Information about the connector definition version, which is a container +// for connectors. +type ConnectorDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of references to connectors in this version, with their corresponding + // configuration settings. + Connectors []*Connector `type:"list"` +} + +// String returns the string representation +func (s ConnectorDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectorDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectorDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectorDefinitionVersion"} + if s.Connectors != nil { + for i, v := range s.Connectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Connectors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectors sets the Connectors field's value. +func (s *ConnectorDefinitionVersion) SetConnectors(v []*Connector) *ConnectorDefinitionVersion { + s.Connectors = v + return s +} + +// Information about a core. +type Core struct { + _ struct{} `type:"structure"` + + // The ARN of the certificate associated with the core. + // + // CertificateArn is a required field + CertificateArn *string `type:"string" required:"true"` + + // A descriptive or arbitrary ID for the core. This value must be unique within + // the core definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // If true, the core's local shadow is automatically synced with the cloud. + SyncShadow *bool `type:"boolean"` + + // The ARN of the thing which is the core. + // + // ThingArn is a required field + ThingArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Core) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Core) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Core) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Core"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ThingArn == nil { + invalidParams.Add(request.NewErrParamRequired("ThingArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *Core) SetCertificateArn(v string) *Core { + s.CertificateArn = &v + return s +} + +// SetId sets the Id field's value. +func (s *Core) SetId(v string) *Core { + s.Id = &v + return s +} + +// SetSyncShadow sets the SyncShadow field's value. +func (s *Core) SetSyncShadow(v bool) *Core { + s.SyncShadow = &v + return s +} + +// SetThingArn sets the ThingArn field's value. +func (s *Core) SetThingArn(v string) *Core { + s.ThingArn = &v + return s +} + +// Information about a core definition version. +type CoreDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of cores in the core definition version. + Cores []*Core `type:"list"` +} + +// String returns the string representation +func (s CoreDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CoreDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CoreDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CoreDefinitionVersion"} + if s.Cores != nil { + for i, v := range s.Cores { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Cores", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCores sets the Cores field's value. +func (s *CoreDefinitionVersion) SetCores(v []*Core) *CoreDefinitionVersion { + s.Cores = v + return s +} + +type CreateConnectorDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about the connector definition version, which is a container + // for connectors. + InitialVersion *ConnectorDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateConnectorDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectorDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConnectorDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConnectorDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateConnectorDefinitionInput) SetAmznClientToken(v string) *CreateConnectorDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateConnectorDefinitionInput) SetInitialVersion(v *ConnectorDefinitionVersion) *CreateConnectorDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateConnectorDefinitionInput) SetName(v string) *CreateConnectorDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateConnectorDefinitionInput) SetTags(v map[string]*string) *CreateConnectorDefinitionInput { + s.Tags = v + return s +} + +type CreateConnectorDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateConnectorDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectorDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateConnectorDefinitionOutput) SetArn(v string) *CreateConnectorDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateConnectorDefinitionOutput) SetCreationTimestamp(v string) *CreateConnectorDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateConnectorDefinitionOutput) SetId(v string) *CreateConnectorDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateConnectorDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateConnectorDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateConnectorDefinitionOutput) SetLatestVersion(v string) *CreateConnectorDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateConnectorDefinitionOutput) SetLatestVersionArn(v string) *CreateConnectorDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateConnectorDefinitionOutput) SetName(v string) *CreateConnectorDefinitionOutput { + s.Name = &v + return s +} + +type CreateConnectorDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` + + Connectors []*Connector `type:"list"` +} + +// String returns the string representation +func (s CreateConnectorDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectorDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConnectorDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConnectorDefinitionVersionInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + if s.Connectors != nil { + for i, v := range s.Connectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Connectors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateConnectorDefinitionVersionInput) SetAmznClientToken(v string) *CreateConnectorDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *CreateConnectorDefinitionVersionInput) SetConnectorDefinitionId(v string) *CreateConnectorDefinitionVersionInput { + s.ConnectorDefinitionId = &v + return s +} + +// SetConnectors sets the Connectors field's value. +func (s *CreateConnectorDefinitionVersionInput) SetConnectors(v []*Connector) *CreateConnectorDefinitionVersionInput { + s.Connectors = v + return s +} + +type CreateConnectorDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateConnectorDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectorDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateConnectorDefinitionVersionOutput) SetArn(v string) *CreateConnectorDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateConnectorDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateConnectorDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateConnectorDefinitionVersionOutput) SetId(v string) *CreateConnectorDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateConnectorDefinitionVersionOutput) SetVersion(v string) *CreateConnectorDefinitionVersionOutput { + s.Version = &v + return s +} + +type CreateCoreDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a core definition version. + InitialVersion *CoreDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateCoreDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCoreDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCoreDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCoreDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateCoreDefinitionInput) SetAmznClientToken(v string) *CreateCoreDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateCoreDefinitionInput) SetInitialVersion(v *CoreDefinitionVersion) *CreateCoreDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateCoreDefinitionInput) SetName(v string) *CreateCoreDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateCoreDefinitionInput) SetTags(v map[string]*string) *CreateCoreDefinitionInput { + s.Tags = v + return s +} + +type CreateCoreDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateCoreDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCoreDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateCoreDefinitionOutput) SetArn(v string) *CreateCoreDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateCoreDefinitionOutput) SetCreationTimestamp(v string) *CreateCoreDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateCoreDefinitionOutput) SetId(v string) *CreateCoreDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateCoreDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateCoreDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateCoreDefinitionOutput) SetLatestVersion(v string) *CreateCoreDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateCoreDefinitionOutput) SetLatestVersionArn(v string) *CreateCoreDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateCoreDefinitionOutput) SetName(v string) *CreateCoreDefinitionOutput { + s.Name = &v + return s +} + +type CreateCoreDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` + + Cores []*Core `type:"list"` +} + +// String returns the string representation +func (s CreateCoreDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCoreDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCoreDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCoreDefinitionVersionInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + if s.Cores != nil { + for i, v := range s.Cores { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Cores", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateCoreDefinitionVersionInput) SetAmznClientToken(v string) *CreateCoreDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *CreateCoreDefinitionVersionInput) SetCoreDefinitionId(v string) *CreateCoreDefinitionVersionInput { + s.CoreDefinitionId = &v + return s +} + +// SetCores sets the Cores field's value. +func (s *CreateCoreDefinitionVersionInput) SetCores(v []*Core) *CreateCoreDefinitionVersionInput { + s.Cores = v + return s +} + +type CreateCoreDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateCoreDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCoreDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateCoreDefinitionVersionOutput) SetArn(v string) *CreateCoreDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateCoreDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateCoreDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateCoreDefinitionVersionOutput) SetId(v string) *CreateCoreDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateCoreDefinitionVersionOutput) SetVersion(v string) *CreateCoreDefinitionVersionOutput { + s.Version = &v + return s +} + +// Information about a deployment. +type CreateDeploymentInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // The ID of the deployment if you wish to redeploy a previous deployment. + DeploymentId *string `type:"string"` + + // The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' + // and ''Redeployment'' are valid. + // + // DeploymentType is a required field + DeploymentType *string `type:"string" required:"true" enum:"DeploymentType"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + // The ID of the group version to be deployed. + GroupVersionId *string `type:"string"` +} + +// String returns the string representation +func (s CreateDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"} + if s.DeploymentType == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentType")) + } + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateDeploymentInput) SetAmznClientToken(v string) *CreateDeploymentInput { + s.AmznClientToken = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CreateDeploymentInput) SetDeploymentId(v string) *CreateDeploymentInput { + s.DeploymentId = &v + return s +} + +// SetDeploymentType sets the DeploymentType field's value. +func (s *CreateDeploymentInput) SetDeploymentType(v string) *CreateDeploymentInput { + s.DeploymentType = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *CreateDeploymentInput) SetGroupId(v string) *CreateDeploymentInput { + s.GroupId = &v + return s +} + +// SetGroupVersionId sets the GroupVersionId field's value. +func (s *CreateDeploymentInput) SetGroupVersionId(v string) *CreateDeploymentInput { + s.GroupVersionId = &v + return s +} + +type CreateDeploymentOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the deployment. + DeploymentArn *string `type:"string"` + + // The ID of the deployment. + DeploymentId *string `type:"string"` +} + +// String returns the string representation +func (s CreateDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeploymentOutput) GoString() string { + return s.String() +} + +// SetDeploymentArn sets the DeploymentArn field's value. +func (s *CreateDeploymentOutput) SetDeploymentArn(v string) *CreateDeploymentOutput { + s.DeploymentArn = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutput { + s.DeploymentId = &v + return s +} + +type CreateDeviceDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a device definition version. + InitialVersion *DeviceDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateDeviceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeviceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeviceDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateDeviceDefinitionInput) SetAmznClientToken(v string) *CreateDeviceDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateDeviceDefinitionInput) SetInitialVersion(v *DeviceDefinitionVersion) *CreateDeviceDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDeviceDefinitionInput) SetName(v string) *CreateDeviceDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDeviceDefinitionInput) SetTags(v map[string]*string) *CreateDeviceDefinitionInput { + s.Tags = v + return s +} + +type CreateDeviceDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateDeviceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateDeviceDefinitionOutput) SetArn(v string) *CreateDeviceDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateDeviceDefinitionOutput) SetCreationTimestamp(v string) *CreateDeviceDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateDeviceDefinitionOutput) SetId(v string) *CreateDeviceDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateDeviceDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateDeviceDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateDeviceDefinitionOutput) SetLatestVersion(v string) *CreateDeviceDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateDeviceDefinitionOutput) SetLatestVersionArn(v string) *CreateDeviceDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDeviceDefinitionOutput) SetName(v string) *CreateDeviceDefinitionOutput { + s.Name = &v + return s +} + +type CreateDeviceDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` + + Devices []*Device `type:"list"` +} + +// String returns the string representation +func (s CreateDeviceDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeviceDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeviceDefinitionVersionInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + if s.Devices != nil { + for i, v := range s.Devices { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Devices", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateDeviceDefinitionVersionInput) SetAmznClientToken(v string) *CreateDeviceDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *CreateDeviceDefinitionVersionInput) SetDeviceDefinitionId(v string) *CreateDeviceDefinitionVersionInput { + s.DeviceDefinitionId = &v + return s +} + +// SetDevices sets the Devices field's value. +func (s *CreateDeviceDefinitionVersionInput) SetDevices(v []*Device) *CreateDeviceDefinitionVersionInput { + s.Devices = v + return s +} + +type CreateDeviceDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateDeviceDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateDeviceDefinitionVersionOutput) SetArn(v string) *CreateDeviceDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateDeviceDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateDeviceDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateDeviceDefinitionVersionOutput) SetId(v string) *CreateDeviceDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateDeviceDefinitionVersionOutput) SetVersion(v string) *CreateDeviceDefinitionVersionOutput { + s.Version = &v + return s +} + +type CreateFunctionDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a function definition version. + InitialVersion *FunctionDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateFunctionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFunctionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFunctionDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateFunctionDefinitionInput) SetAmznClientToken(v string) *CreateFunctionDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateFunctionDefinitionInput) SetInitialVersion(v *FunctionDefinitionVersion) *CreateFunctionDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFunctionDefinitionInput) SetName(v string) *CreateFunctionDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateFunctionDefinitionInput) SetTags(v map[string]*string) *CreateFunctionDefinitionInput { + s.Tags = v + return s +} + +type CreateFunctionDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateFunctionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateFunctionDefinitionOutput) SetArn(v string) *CreateFunctionDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateFunctionDefinitionOutput) SetCreationTimestamp(v string) *CreateFunctionDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateFunctionDefinitionOutput) SetId(v string) *CreateFunctionDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateFunctionDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateFunctionDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateFunctionDefinitionOutput) SetLatestVersion(v string) *CreateFunctionDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateFunctionDefinitionOutput) SetLatestVersionArn(v string) *CreateFunctionDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFunctionDefinitionOutput) SetName(v string) *CreateFunctionDefinitionOutput { + s.Name = &v + return s +} + +type CreateFunctionDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // The default configuration that applies to all Lambda functions in the group. + // Individual Lambda functions can override these settings. + DefaultConfig *FunctionDefaultConfig `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` + + Functions []*Function `type:"list"` +} + +// String returns the string representation +func (s CreateFunctionDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFunctionDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFunctionDefinitionVersionInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + if s.Functions != nil { + for i, v := range s.Functions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Functions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateFunctionDefinitionVersionInput) SetAmznClientToken(v string) *CreateFunctionDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetDefaultConfig sets the DefaultConfig field's value. +func (s *CreateFunctionDefinitionVersionInput) SetDefaultConfig(v *FunctionDefaultConfig) *CreateFunctionDefinitionVersionInput { + s.DefaultConfig = v + return s +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *CreateFunctionDefinitionVersionInput) SetFunctionDefinitionId(v string) *CreateFunctionDefinitionVersionInput { + s.FunctionDefinitionId = &v + return s +} + +// SetFunctions sets the Functions field's value. +func (s *CreateFunctionDefinitionVersionInput) SetFunctions(v []*Function) *CreateFunctionDefinitionVersionInput { + s.Functions = v + return s +} + +type CreateFunctionDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateFunctionDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateFunctionDefinitionVersionOutput) SetArn(v string) *CreateFunctionDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateFunctionDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateFunctionDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateFunctionDefinitionVersionOutput) SetId(v string) *CreateFunctionDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateFunctionDefinitionVersionOutput) SetVersion(v string) *CreateFunctionDefinitionVersionOutput { + s.Version = &v + return s +} + +type CreateGroupCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateGroupCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGroupCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGroupCertificateAuthorityInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateGroupCertificateAuthorityInput) SetAmznClientToken(v string) *CreateGroupCertificateAuthorityInput { + s.AmznClientToken = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *CreateGroupCertificateAuthorityInput) SetGroupId(v string) *CreateGroupCertificateAuthorityInput { + s.GroupId = &v + return s +} + +type CreateGroupCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the group certificate authority. + GroupCertificateAuthorityArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateGroupCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetGroupCertificateAuthorityArn sets the GroupCertificateAuthorityArn field's value. +func (s *CreateGroupCertificateAuthorityOutput) SetGroupCertificateAuthorityArn(v string) *CreateGroupCertificateAuthorityOutput { + s.GroupCertificateAuthorityArn = &v + return s +} + +type CreateGroupInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a group version. + InitialVersion *GroupVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupInput) GoString() string { + return s.String() +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateGroupInput) SetAmznClientToken(v string) *CreateGroupInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateGroupInput) SetInitialVersion(v *GroupVersion) *CreateGroupInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateGroupInput) SetTags(v map[string]*string) *CreateGroupInput { + s.Tags = v + return s +} + +type CreateGroupOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateGroupOutput) SetArn(v string) *CreateGroupOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateGroupOutput) SetCreationTimestamp(v string) *CreateGroupOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateGroupOutput) SetId(v string) *CreateGroupOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateGroupOutput) SetLastUpdatedTimestamp(v string) *CreateGroupOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateGroupOutput) SetLatestVersion(v string) *CreateGroupOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateGroupOutput) SetLatestVersionArn(v string) *CreateGroupOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGroupOutput) SetName(v string) *CreateGroupOutput { + s.Name = &v + return s +} + +type CreateGroupVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + ConnectorDefinitionVersionArn *string `type:"string"` + + CoreDefinitionVersionArn *string `type:"string"` + + DeviceDefinitionVersionArn *string `type:"string"` + + FunctionDefinitionVersionArn *string `type:"string"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + LoggerDefinitionVersionArn *string `type:"string"` + + ResourceDefinitionVersionArn *string `type:"string"` + + SubscriptionDefinitionVersionArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateGroupVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGroupVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGroupVersionInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateGroupVersionInput) SetAmznClientToken(v string) *CreateGroupVersionInput { + s.AmznClientToken = &v + return s +} + +// SetConnectorDefinitionVersionArn sets the ConnectorDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetConnectorDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.ConnectorDefinitionVersionArn = &v + return s +} + +// SetCoreDefinitionVersionArn sets the CoreDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetCoreDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.CoreDefinitionVersionArn = &v + return s +} + +// SetDeviceDefinitionVersionArn sets the DeviceDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetDeviceDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.DeviceDefinitionVersionArn = &v + return s +} + +// SetFunctionDefinitionVersionArn sets the FunctionDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetFunctionDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.FunctionDefinitionVersionArn = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *CreateGroupVersionInput) SetGroupId(v string) *CreateGroupVersionInput { + s.GroupId = &v + return s +} + +// SetLoggerDefinitionVersionArn sets the LoggerDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetLoggerDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.LoggerDefinitionVersionArn = &v + return s +} + +// SetResourceDefinitionVersionArn sets the ResourceDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetResourceDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.ResourceDefinitionVersionArn = &v + return s +} + +// SetSubscriptionDefinitionVersionArn sets the SubscriptionDefinitionVersionArn field's value. +func (s *CreateGroupVersionInput) SetSubscriptionDefinitionVersionArn(v string) *CreateGroupVersionInput { + s.SubscriptionDefinitionVersionArn = &v + return s +} + +type CreateGroupVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateGroupVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateGroupVersionOutput) SetArn(v string) *CreateGroupVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateGroupVersionOutput) SetCreationTimestamp(v string) *CreateGroupVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateGroupVersionOutput) SetId(v string) *CreateGroupVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateGroupVersionOutput) SetVersion(v string) *CreateGroupVersionOutput { + s.Version = &v + return s +} + +type CreateLoggerDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a logger definition version. + InitialVersion *LoggerDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateLoggerDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoggerDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoggerDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoggerDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateLoggerDefinitionInput) SetAmznClientToken(v string) *CreateLoggerDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateLoggerDefinitionInput) SetInitialVersion(v *LoggerDefinitionVersion) *CreateLoggerDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateLoggerDefinitionInput) SetName(v string) *CreateLoggerDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLoggerDefinitionInput) SetTags(v map[string]*string) *CreateLoggerDefinitionInput { + s.Tags = v + return s +} + +type CreateLoggerDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateLoggerDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoggerDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateLoggerDefinitionOutput) SetArn(v string) *CreateLoggerDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateLoggerDefinitionOutput) SetCreationTimestamp(v string) *CreateLoggerDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateLoggerDefinitionOutput) SetId(v string) *CreateLoggerDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateLoggerDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateLoggerDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateLoggerDefinitionOutput) SetLatestVersion(v string) *CreateLoggerDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateLoggerDefinitionOutput) SetLatestVersionArn(v string) *CreateLoggerDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateLoggerDefinitionOutput) SetName(v string) *CreateLoggerDefinitionOutput { + s.Name = &v + return s +} + +type CreateLoggerDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` + + Loggers []*Logger `type:"list"` +} + +// String returns the string representation +func (s CreateLoggerDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoggerDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoggerDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoggerDefinitionVersionInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + if s.Loggers != nil { + for i, v := range s.Loggers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Loggers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateLoggerDefinitionVersionInput) SetAmznClientToken(v string) *CreateLoggerDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *CreateLoggerDefinitionVersionInput) SetLoggerDefinitionId(v string) *CreateLoggerDefinitionVersionInput { + s.LoggerDefinitionId = &v + return s +} + +// SetLoggers sets the Loggers field's value. +func (s *CreateLoggerDefinitionVersionInput) SetLoggers(v []*Logger) *CreateLoggerDefinitionVersionInput { + s.Loggers = v + return s +} + +type CreateLoggerDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateLoggerDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoggerDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateLoggerDefinitionVersionOutput) SetArn(v string) *CreateLoggerDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateLoggerDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateLoggerDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateLoggerDefinitionVersionOutput) SetId(v string) *CreateLoggerDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateLoggerDefinitionVersionOutput) SetVersion(v string) *CreateLoggerDefinitionVersionOutput { + s.Version = &v + return s +} + +type CreateResourceDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a resource definition version. + InitialVersion *ResourceDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateResourceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourceDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateResourceDefinitionInput) SetAmznClientToken(v string) *CreateResourceDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateResourceDefinitionInput) SetInitialVersion(v *ResourceDefinitionVersion) *CreateResourceDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateResourceDefinitionInput) SetName(v string) *CreateResourceDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateResourceDefinitionInput) SetTags(v map[string]*string) *CreateResourceDefinitionInput { + s.Tags = v + return s +} + +type CreateResourceDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateResourceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateResourceDefinitionOutput) SetArn(v string) *CreateResourceDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateResourceDefinitionOutput) SetCreationTimestamp(v string) *CreateResourceDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateResourceDefinitionOutput) SetId(v string) *CreateResourceDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateResourceDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateResourceDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateResourceDefinitionOutput) SetLatestVersion(v string) *CreateResourceDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateResourceDefinitionOutput) SetLatestVersionArn(v string) *CreateResourceDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateResourceDefinitionOutput) SetName(v string) *CreateResourceDefinitionOutput { + s.Name = &v + return s +} + +type CreateResourceDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` + + Resources []*Resource `type:"list"` +} + +// String returns the string representation +func (s CreateResourceDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourceDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourceDefinitionVersionInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + if s.Resources != nil { + for i, v := range s.Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateResourceDefinitionVersionInput) SetAmznClientToken(v string) *CreateResourceDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *CreateResourceDefinitionVersionInput) SetResourceDefinitionId(v string) *CreateResourceDefinitionVersionInput { + s.ResourceDefinitionId = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *CreateResourceDefinitionVersionInput) SetResources(v []*Resource) *CreateResourceDefinitionVersionInput { + s.Resources = v + return s +} + +type CreateResourceDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateResourceDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateResourceDefinitionVersionOutput) SetArn(v string) *CreateResourceDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateResourceDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateResourceDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateResourceDefinitionVersionOutput) SetId(v string) *CreateResourceDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateResourceDefinitionVersionOutput) SetVersion(v string) *CreateResourceDefinitionVersionOutput { + s.Version = &v + return s +} + +// Request for the CreateSoftwareUpdateJob API. +type CreateSoftwareUpdateJobInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // The IAM Role that Greengrass will use to create pre-signed URLs pointing + // towards the update artifact. + // + // S3UrlSignerRole is a required field + S3UrlSignerRole *string `type:"string" required:"true"` + + // The piece of software on the Greengrass core that will be updated. + // + // SoftwareToUpdate is a required field + SoftwareToUpdate *string `type:"string" required:"true" enum:"SoftwareToUpdate"` + + // The minimum level of log statements that should be logged by the OTA Agent + // during an update. + UpdateAgentLogLevel *string `type:"string" enum:"UpdateAgentLogLevel"` + + // The ARNs of the targets (IoT things or IoT thing groups) that this update + // will be applied to. + // + // UpdateTargets is a required field + UpdateTargets []*string `type:"list" required:"true"` + + // The architecture of the cores which are the targets of an update. + // + // UpdateTargetsArchitecture is a required field + UpdateTargetsArchitecture *string `type:"string" required:"true" enum:"UpdateTargetsArchitecture"` + + // The operating system of the cores which are the targets of an update. + // + // UpdateTargetsOperatingSystem is a required field + UpdateTargetsOperatingSystem *string `type:"string" required:"true" enum:"UpdateTargetsOperatingSystem"` +} + +// String returns the string representation +func (s CreateSoftwareUpdateJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSoftwareUpdateJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSoftwareUpdateJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSoftwareUpdateJobInput"} + if s.S3UrlSignerRole == nil { + invalidParams.Add(request.NewErrParamRequired("S3UrlSignerRole")) + } + if s.SoftwareToUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("SoftwareToUpdate")) + } + if s.UpdateTargets == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateTargets")) + } + if s.UpdateTargetsArchitecture == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateTargetsArchitecture")) + } + if s.UpdateTargetsOperatingSystem == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateTargetsOperatingSystem")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateSoftwareUpdateJobInput) SetAmznClientToken(v string) *CreateSoftwareUpdateJobInput { + s.AmznClientToken = &v + return s +} + +// SetS3UrlSignerRole sets the S3UrlSignerRole field's value. +func (s *CreateSoftwareUpdateJobInput) SetS3UrlSignerRole(v string) *CreateSoftwareUpdateJobInput { + s.S3UrlSignerRole = &v + return s +} + +// SetSoftwareToUpdate sets the SoftwareToUpdate field's value. +func (s *CreateSoftwareUpdateJobInput) SetSoftwareToUpdate(v string) *CreateSoftwareUpdateJobInput { + s.SoftwareToUpdate = &v + return s +} + +// SetUpdateAgentLogLevel sets the UpdateAgentLogLevel field's value. +func (s *CreateSoftwareUpdateJobInput) SetUpdateAgentLogLevel(v string) *CreateSoftwareUpdateJobInput { + s.UpdateAgentLogLevel = &v + return s +} + +// SetUpdateTargets sets the UpdateTargets field's value. +func (s *CreateSoftwareUpdateJobInput) SetUpdateTargets(v []*string) *CreateSoftwareUpdateJobInput { + s.UpdateTargets = v + return s +} + +// SetUpdateTargetsArchitecture sets the UpdateTargetsArchitecture field's value. +func (s *CreateSoftwareUpdateJobInput) SetUpdateTargetsArchitecture(v string) *CreateSoftwareUpdateJobInput { + s.UpdateTargetsArchitecture = &v + return s +} + +// SetUpdateTargetsOperatingSystem sets the UpdateTargetsOperatingSystem field's value. +func (s *CreateSoftwareUpdateJobInput) SetUpdateTargetsOperatingSystem(v string) *CreateSoftwareUpdateJobInput { + s.UpdateTargetsOperatingSystem = &v + return s +} + +type CreateSoftwareUpdateJobOutput struct { + _ struct{} `type:"structure"` + + // The IoT Job ARN corresponding to this update. + IotJobArn *string `type:"string"` + + // The IoT Job Id corresponding to this update. + IotJobId *string `type:"string"` + + // The software version installed on the device or devices after the update. + PlatformSoftwareVersion *string `type:"string"` +} + +// String returns the string representation +func (s CreateSoftwareUpdateJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSoftwareUpdateJobOutput) GoString() string { + return s.String() +} + +// SetIotJobArn sets the IotJobArn field's value. +func (s *CreateSoftwareUpdateJobOutput) SetIotJobArn(v string) *CreateSoftwareUpdateJobOutput { + s.IotJobArn = &v + return s +} + +// SetIotJobId sets the IotJobId field's value. +func (s *CreateSoftwareUpdateJobOutput) SetIotJobId(v string) *CreateSoftwareUpdateJobOutput { + s.IotJobId = &v + return s +} + +// SetPlatformSoftwareVersion sets the PlatformSoftwareVersion field's value. +func (s *CreateSoftwareUpdateJobOutput) SetPlatformSoftwareVersion(v string) *CreateSoftwareUpdateJobOutput { + s.PlatformSoftwareVersion = &v + return s +} + +type CreateSubscriptionDefinitionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // Information about a subscription definition version. + InitialVersion *SubscriptionDefinitionVersion `type:"structure"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateSubscriptionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriptionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSubscriptionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubscriptionDefinitionInput"} + if s.InitialVersion != nil { + if err := s.InitialVersion.Validate(); err != nil { + invalidParams.AddNested("InitialVersion", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateSubscriptionDefinitionInput) SetAmznClientToken(v string) *CreateSubscriptionDefinitionInput { + s.AmznClientToken = &v + return s +} + +// SetInitialVersion sets the InitialVersion field's value. +func (s *CreateSubscriptionDefinitionInput) SetInitialVersion(v *SubscriptionDefinitionVersion) *CreateSubscriptionDefinitionInput { + s.InitialVersion = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSubscriptionDefinitionInput) SetName(v string) *CreateSubscriptionDefinitionInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSubscriptionDefinitionInput) SetTags(v map[string]*string) *CreateSubscriptionDefinitionInput { + s.Tags = v + return s +} + +type CreateSubscriptionDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateSubscriptionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriptionDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateSubscriptionDefinitionOutput) SetArn(v string) *CreateSubscriptionDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateSubscriptionDefinitionOutput) SetCreationTimestamp(v string) *CreateSubscriptionDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateSubscriptionDefinitionOutput) SetId(v string) *CreateSubscriptionDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *CreateSubscriptionDefinitionOutput) SetLastUpdatedTimestamp(v string) *CreateSubscriptionDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *CreateSubscriptionDefinitionOutput) SetLatestVersion(v string) *CreateSubscriptionDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *CreateSubscriptionDefinitionOutput) SetLatestVersionArn(v string) *CreateSubscriptionDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSubscriptionDefinitionOutput) SetName(v string) *CreateSubscriptionDefinitionOutput { + s.Name = &v + return s +} + +type CreateSubscriptionDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` + + Subscriptions []*Subscription `type:"list"` +} + +// String returns the string representation +func (s CreateSubscriptionDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriptionDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSubscriptionDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubscriptionDefinitionVersionInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + if s.Subscriptions != nil { + for i, v := range s.Subscriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscriptions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *CreateSubscriptionDefinitionVersionInput) SetAmznClientToken(v string) *CreateSubscriptionDefinitionVersionInput { + s.AmznClientToken = &v + return s +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *CreateSubscriptionDefinitionVersionInput) SetSubscriptionDefinitionId(v string) *CreateSubscriptionDefinitionVersionInput { + s.SubscriptionDefinitionId = &v + return s +} + +// SetSubscriptions sets the Subscriptions field's value. +func (s *CreateSubscriptionDefinitionVersionInput) SetSubscriptions(v []*Subscription) *CreateSubscriptionDefinitionVersionInput { + s.Subscriptions = v + return s +} + +type CreateSubscriptionDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + Version *string `type:"string"` +} + +// String returns the string representation +func (s CreateSubscriptionDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriptionDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateSubscriptionDefinitionVersionOutput) SetArn(v string) *CreateSubscriptionDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *CreateSubscriptionDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateSubscriptionDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateSubscriptionDefinitionVersionOutput) SetId(v string) *CreateSubscriptionDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateSubscriptionDefinitionVersionOutput) SetVersion(v string) *CreateSubscriptionDefinitionVersionOutput { + s.Version = &v + return s +} + +// Information about a definition. +type DefinitionInformation struct { + _ struct{} `type:"structure"` + + // The ARN of the definition. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the definition was created. + CreationTimestamp *string `type:"string"` + + // The ID of the definition. + Id *string `type:"string"` + + // The time, in milliseconds since the epoch, when the definition was last updated. + LastUpdatedTimestamp *string `type:"string"` + + // The ID of the latest version associated with the definition. + LatestVersion *string `type:"string"` + + // The ARN of the latest version associated with the definition. + LatestVersionArn *string `type:"string"` + + // The name of the definition. + Name *string `type:"string"` + + // Tag(s) attached to the resource arn. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s DefinitionInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefinitionInformation) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DefinitionInformation) SetArn(v string) *DefinitionInformation { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *DefinitionInformation) SetCreationTimestamp(v string) *DefinitionInformation { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *DefinitionInformation) SetId(v string) *DefinitionInformation { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *DefinitionInformation) SetLastUpdatedTimestamp(v string) *DefinitionInformation { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *DefinitionInformation) SetLatestVersion(v string) *DefinitionInformation { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *DefinitionInformation) SetLatestVersionArn(v string) *DefinitionInformation { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *DefinitionInformation) SetName(v string) *DefinitionInformation { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DefinitionInformation) SetTags(v map[string]*string) *DefinitionInformation { + s.Tags = v + return s +} + +type DeleteConnectorDefinitionInput struct { + _ struct{} `type:"structure"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConnectorDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConnectorDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConnectorDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConnectorDefinitionInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *DeleteConnectorDefinitionInput) SetConnectorDefinitionId(v string) *DeleteConnectorDefinitionInput { + s.ConnectorDefinitionId = &v + return s +} + +type DeleteConnectorDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConnectorDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConnectorDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteCoreDefinitionInput struct { + _ struct{} `type:"structure"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCoreDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCoreDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCoreDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCoreDefinitionInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *DeleteCoreDefinitionInput) SetCoreDefinitionId(v string) *DeleteCoreDefinitionInput { + s.CoreDefinitionId = &v + return s +} + +type DeleteCoreDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCoreDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCoreDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteDeviceDefinitionInput struct { + _ struct{} `type:"structure"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDeviceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeviceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeviceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeviceDefinitionInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *DeleteDeviceDefinitionInput) SetDeviceDefinitionId(v string) *DeleteDeviceDefinitionInput { + s.DeviceDefinitionId = &v + return s +} + +type DeleteDeviceDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDeviceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeviceDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteFunctionDefinitionInput struct { + _ struct{} `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFunctionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFunctionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFunctionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionDefinitionInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *DeleteFunctionDefinitionInput) SetFunctionDefinitionId(v string) *DeleteFunctionDefinitionInput { + s.FunctionDefinitionId = &v + return s +} + +type DeleteFunctionDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFunctionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFunctionDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteGroupInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *DeleteGroupInput) SetGroupId(v string) *DeleteGroupInput { + s.GroupId = &v + return s +} + +type DeleteGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGroupOutput) GoString() string { + return s.String() +} + +type DeleteLoggerDefinitionInput struct { + _ struct{} `type:"structure"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLoggerDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoggerDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoggerDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoggerDefinitionInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *DeleteLoggerDefinitionInput) SetLoggerDefinitionId(v string) *DeleteLoggerDefinitionInput { + s.LoggerDefinitionId = &v + return s +} + +type DeleteLoggerDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLoggerDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoggerDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteResourceDefinitionInput struct { + _ struct{} `type:"structure"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourceDefinitionInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *DeleteResourceDefinitionInput) SetResourceDefinitionId(v string) *DeleteResourceDefinitionInput { + s.ResourceDefinitionId = &v + return s +} + +type DeleteResourceDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResourceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourceDefinitionOutput) GoString() string { + return s.String() +} + +type DeleteSubscriptionDefinitionInput struct { + _ struct{} `type:"structure"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSubscriptionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubscriptionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubscriptionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionDefinitionInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *DeleteSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string) *DeleteSubscriptionDefinitionInput { + s.SubscriptionDefinitionId = &v + return s +} + +type DeleteSubscriptionDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSubscriptionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubscriptionDefinitionOutput) GoString() string { + return s.String() +} + +// Information about a deployment. +type Deployment struct { + _ struct{} `type:"structure"` + + // The time, in milliseconds since the epoch, when the deployment was created. + CreatedAt *string `type:"string"` + + // The ARN of the deployment. + DeploymentArn *string `type:"string"` + + // The ID of the deployment. + DeploymentId *string `type:"string"` + + // The type of the deployment. + DeploymentType *string `type:"string" enum:"DeploymentType"` + + // The ARN of the group for this deployment. + GroupArn *string `type:"string"` +} + +// String returns the string representation +func (s Deployment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deployment) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Deployment) SetCreatedAt(v string) *Deployment { + s.CreatedAt = &v + return s +} + +// SetDeploymentArn sets the DeploymentArn field's value. +func (s *Deployment) SetDeploymentArn(v string) *Deployment { + s.DeploymentArn = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *Deployment) SetDeploymentId(v string) *Deployment { + s.DeploymentId = &v + return s +} + +// SetDeploymentType sets the DeploymentType field's value. +func (s *Deployment) SetDeploymentType(v string) *Deployment { + s.DeploymentType = &v + return s +} + +// SetGroupArn sets the GroupArn field's value. +func (s *Deployment) SetGroupArn(v string) *Deployment { + s.GroupArn = &v + return s +} + +// Information about a device. +type Device struct { + _ struct{} `type:"structure"` + + // The ARN of the certificate associated with the device. + // + // CertificateArn is a required field + CertificateArn *string `type:"string" required:"true"` + + // A descriptive or arbitrary ID for the device. This value must be unique within + // the device definition version. Max length is 128 characters with pattern + // ''[a-zA-Z0-9:_-]+''. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // If true, the device's local shadow will be automatically synced with the + // cloud. + SyncShadow *bool `type:"boolean"` + + // The thing ARN of the device. + // + // ThingArn is a required field + ThingArn *string `type:"string" required:"true"` +} + +// 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() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Device) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Device"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ThingArn == nil { + invalidParams.Add(request.NewErrParamRequired("ThingArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *Device) SetCertificateArn(v string) *Device { + s.CertificateArn = &v + return s +} + +// SetId sets the Id field's value. +func (s *Device) SetId(v string) *Device { + s.Id = &v + return s +} + +// SetSyncShadow sets the SyncShadow field's value. +func (s *Device) SetSyncShadow(v bool) *Device { + s.SyncShadow = &v + return s +} + +// SetThingArn sets the ThingArn field's value. +func (s *Device) SetThingArn(v string) *Device { + s.ThingArn = &v + return s +} + +// Information about a device definition version. +type DeviceDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of devices in the definition version. + Devices []*Device `type:"list"` +} + +// String returns the string representation +func (s DeviceDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeviceDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeviceDefinitionVersion"} + if s.Devices != nil { + for i, v := range s.Devices { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Devices", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDevices sets the Devices field's value. +func (s *DeviceDefinitionVersion) SetDevices(v []*Device) *DeviceDefinitionVersion { + s.Devices = v + return s +} + +type DisassociateRoleFromGroupInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateRoleFromGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRoleFromGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateRoleFromGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateRoleFromGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *DisassociateRoleFromGroupInput) SetGroupId(v string) *DisassociateRoleFromGroupInput { + s.GroupId = &v + return s +} + +type DisassociateRoleFromGroupOutput struct { + _ struct{} `type:"structure"` + + // The time, in milliseconds since the epoch, when the role was disassociated + // from the group. + DisassociatedAt *string `type:"string"` +} + +// String returns the string representation +func (s DisassociateRoleFromGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRoleFromGroupOutput) GoString() string { + return s.String() +} + +// SetDisassociatedAt sets the DisassociatedAt field's value. +func (s *DisassociateRoleFromGroupOutput) SetDisassociatedAt(v string) *DisassociateRoleFromGroupOutput { + s.DisassociatedAt = &v + return s +} + +type DisassociateServiceRoleFromAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateServiceRoleFromAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateServiceRoleFromAccountInput) GoString() string { + return s.String() +} + +type DisassociateServiceRoleFromAccountOutput struct { + _ struct{} `type:"structure"` + + // The time when the service role was disassociated from the account. + DisassociatedAt *string `type:"string"` +} + +// String returns the string representation +func (s DisassociateServiceRoleFromAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateServiceRoleFromAccountOutput) GoString() string { + return s.String() +} + +// SetDisassociatedAt sets the DisassociatedAt field's value. +func (s *DisassociateServiceRoleFromAccountOutput) SetDisassociatedAt(v string) *DisassociateServiceRoleFromAccountOutput { + s.DisassociatedAt = &v + return s +} + +// Details about the error. +type ErrorDetail struct { + _ struct{} `type:"structure"` + + // A detailed error code. + DetailedErrorCode *string `type:"string"` + + // A detailed error message. + DetailedErrorMessage *string `type:"string"` +} + +// String returns the string representation +func (s ErrorDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ErrorDetail) GoString() string { + return s.String() +} + +// SetDetailedErrorCode sets the DetailedErrorCode field's value. +func (s *ErrorDetail) SetDetailedErrorCode(v string) *ErrorDetail { + s.DetailedErrorCode = &v + return s +} + +// SetDetailedErrorMessage sets the DetailedErrorMessage field's value. +func (s *ErrorDetail) SetDetailedErrorMessage(v string) *ErrorDetail { + s.DetailedErrorMessage = &v + return s +} + +// Information about a Lambda function. +type Function struct { + _ struct{} `type:"structure"` + + // The ARN of the Lambda function. + FunctionArn *string `type:"string"` + + // The configuration of the Lambda function. + FunctionConfiguration *FunctionConfiguration `type:"structure"` + + // A descriptive or arbitrary ID for the function. This value must be unique + // within the function definition version. Max length is 128 characters with + // pattern ''[a-zA-Z0-9:_-]+''. + // + // Id is a required field + Id *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Function) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Function) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Function) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Function"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.FunctionConfiguration != nil { + if err := s.FunctionConfiguration.Validate(); err != nil { + invalidParams.AddNested("FunctionConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionArn sets the FunctionArn field's value. +func (s *Function) SetFunctionArn(v string) *Function { + s.FunctionArn = &v + return s +} + +// SetFunctionConfiguration sets the FunctionConfiguration field's value. +func (s *Function) SetFunctionConfiguration(v *FunctionConfiguration) *Function { + s.FunctionConfiguration = v + return s +} + +// SetId sets the Id field's value. +func (s *Function) SetId(v string) *Function { + s.Id = &v + return s +} + +// The configuration of the Lambda function. +type FunctionConfiguration struct { + _ struct{} `type:"structure"` + + // The expected encoding type of the input payload for the function. The default + // is ''json''. + EncodingType *string `type:"string" enum:"EncodingType"` + + // The environment configuration of the function. + Environment *FunctionConfigurationEnvironment `type:"structure"` + + // The execution arguments. + ExecArgs *string `type:"string"` + + // The name of the function executable. + Executable *string `type:"string"` + + // The memory size, in KB, which the function requires. This setting is not + // applicable and should be cleared when you run the Lambda function without + // containerization. + MemorySize *int64 `type:"integer"` + + // True if the function is pinned. Pinned means the function is long-lived and + // starts when the core starts. + Pinned *bool `type:"boolean"` + + // The allowed function execution time, after which Lambda should terminate + // the function. This timeout still applies to pinned Lambda functions for each + // request. + Timeout *int64 `type:"integer"` +} + +// String returns the string representation +func (s FunctionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FunctionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FunctionConfiguration"} + if s.Environment != nil { + if err := s.Environment.Validate(); err != nil { + invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncodingType sets the EncodingType field's value. +func (s *FunctionConfiguration) SetEncodingType(v string) *FunctionConfiguration { + s.EncodingType = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *FunctionConfiguration) SetEnvironment(v *FunctionConfigurationEnvironment) *FunctionConfiguration { + s.Environment = v + return s +} + +// SetExecArgs sets the ExecArgs field's value. +func (s *FunctionConfiguration) SetExecArgs(v string) *FunctionConfiguration { + s.ExecArgs = &v + return s +} + +// SetExecutable sets the Executable field's value. +func (s *FunctionConfiguration) SetExecutable(v string) *FunctionConfiguration { + s.Executable = &v + return s +} + +// SetMemorySize sets the MemorySize field's value. +func (s *FunctionConfiguration) SetMemorySize(v int64) *FunctionConfiguration { + s.MemorySize = &v + return s +} + +// SetPinned sets the Pinned field's value. +func (s *FunctionConfiguration) SetPinned(v bool) *FunctionConfiguration { + s.Pinned = &v + return s +} + +// SetTimeout sets the Timeout field's value. +func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration { + s.Timeout = &v + return s +} + +// The environment configuration of the function. +type FunctionConfigurationEnvironment struct { + _ struct{} `type:"structure"` + + // If true, the Lambda function is allowed to access the host's /sys folder. + // Use this when the Lambda function needs to read device information from /sys. + // This setting applies only when you run the Lambda function in a Greengrass + // container. + AccessSysfs *bool `type:"boolean"` + + // Configuration related to executing the Lambda function + Execution *FunctionExecutionConfig `type:"structure"` + + // A list of the resources, with their permissions, to which the Lambda function + // will be granted access. A Lambda function can have at most 10 resources. + // ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass + // container. + ResourceAccessPolicies []*ResourceAccessPolicy `type:"list"` + + // Environment variables for the Lambda function's configuration. + Variables map[string]*string `type:"map"` +} + +// String returns the string representation +func (s FunctionConfigurationEnvironment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionConfigurationEnvironment) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FunctionConfigurationEnvironment) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FunctionConfigurationEnvironment"} + if s.ResourceAccessPolicies != nil { + for i, v := range s.ResourceAccessPolicies { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceAccessPolicies", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessSysfs sets the AccessSysfs field's value. +func (s *FunctionConfigurationEnvironment) SetAccessSysfs(v bool) *FunctionConfigurationEnvironment { + s.AccessSysfs = &v + return s +} + +// SetExecution sets the Execution field's value. +func (s *FunctionConfigurationEnvironment) SetExecution(v *FunctionExecutionConfig) *FunctionConfigurationEnvironment { + s.Execution = v + return s +} + +// SetResourceAccessPolicies sets the ResourceAccessPolicies field's value. +func (s *FunctionConfigurationEnvironment) SetResourceAccessPolicies(v []*ResourceAccessPolicy) *FunctionConfigurationEnvironment { + s.ResourceAccessPolicies = v + return s +} + +// SetVariables sets the Variables field's value. +func (s *FunctionConfigurationEnvironment) SetVariables(v map[string]*string) *FunctionConfigurationEnvironment { + s.Variables = v + return s +} + +// The default configuration that applies to all Lambda functions in the group. +// Individual Lambda functions can override these settings. +type FunctionDefaultConfig struct { + _ struct{} `type:"structure"` + + // Configuration information that specifies how a Lambda function runs. + Execution *FunctionDefaultExecutionConfig `type:"structure"` +} + +// String returns the string representation +func (s FunctionDefaultConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionDefaultConfig) GoString() string { + return s.String() +} + +// SetExecution sets the Execution field's value. +func (s *FunctionDefaultConfig) SetExecution(v *FunctionDefaultExecutionConfig) *FunctionDefaultConfig { + s.Execution = v + return s +} + +// Configuration information that specifies how a Lambda function runs. +type FunctionDefaultExecutionConfig struct { + _ struct{} `type:"structure"` + + // Specifies whether the Lambda function runs in a Greengrass container (default) + // or without containerization. Unless your scenario requires that you run without + // containerization, we recommend that you run in a Greengrass container. Omit + // this value to run the Lambda function with the default containerization for + // the group. + IsolationMode *string `type:"string" enum:"FunctionIsolationMode"` + + // Specifies the user and group whose permissions are used when running the + // Lambda function. You can specify one or both values to override the default + // values. We recommend that you avoid running as root unless absolutely necessary + // to minimize the risk of unintended changes or malicious attacks. To run as + // root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json + // in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''. + RunAs *FunctionRunAsConfig `type:"structure"` +} + +// String returns the string representation +func (s FunctionDefaultExecutionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionDefaultExecutionConfig) GoString() string { + return s.String() +} + +// SetIsolationMode sets the IsolationMode field's value. +func (s *FunctionDefaultExecutionConfig) SetIsolationMode(v string) *FunctionDefaultExecutionConfig { + s.IsolationMode = &v + return s +} + +// SetRunAs sets the RunAs field's value. +func (s *FunctionDefaultExecutionConfig) SetRunAs(v *FunctionRunAsConfig) *FunctionDefaultExecutionConfig { + s.RunAs = v + return s +} + +// Information about a function definition version. +type FunctionDefinitionVersion struct { + _ struct{} `type:"structure"` + + // The default configuration that applies to all Lambda functions in this function + // definition version. Individual Lambda functions can override these settings. + DefaultConfig *FunctionDefaultConfig `type:"structure"` + + // A list of Lambda functions in this function definition version. + Functions []*Function `type:"list"` +} + +// String returns the string representation +func (s FunctionDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FunctionDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FunctionDefinitionVersion"} + if s.Functions != nil { + for i, v := range s.Functions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Functions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultConfig sets the DefaultConfig field's value. +func (s *FunctionDefinitionVersion) SetDefaultConfig(v *FunctionDefaultConfig) *FunctionDefinitionVersion { + s.DefaultConfig = v + return s +} + +// SetFunctions sets the Functions field's value. +func (s *FunctionDefinitionVersion) SetFunctions(v []*Function) *FunctionDefinitionVersion { + s.Functions = v + return s +} + +// Configuration information that specifies how a Lambda function runs. +type FunctionExecutionConfig struct { + _ struct{} `type:"structure"` + + // Specifies whether the Lambda function runs in a Greengrass container (default) + // or without containerization. Unless your scenario requires that you run without + // containerization, we recommend that you run in a Greengrass container. Omit + // this value to run the Lambda function with the default containerization for + // the group. + IsolationMode *string `type:"string" enum:"FunctionIsolationMode"` + + // Specifies the user and group whose permissions are used when running the + // Lambda function. You can specify one or both values to override the default + // values. We recommend that you avoid running as root unless absolutely necessary + // to minimize the risk of unintended changes or malicious attacks. To run as + // root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json + // in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''. + RunAs *FunctionRunAsConfig `type:"structure"` +} + +// String returns the string representation +func (s FunctionExecutionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionExecutionConfig) GoString() string { + return s.String() +} + +// SetIsolationMode sets the IsolationMode field's value. +func (s *FunctionExecutionConfig) SetIsolationMode(v string) *FunctionExecutionConfig { + s.IsolationMode = &v + return s +} + +// SetRunAs sets the RunAs field's value. +func (s *FunctionExecutionConfig) SetRunAs(v *FunctionRunAsConfig) *FunctionExecutionConfig { + s.RunAs = v + return s +} + +// Specifies the user and group whose permissions are used when running the +// Lambda function. You can specify one or both values to override the default +// values. We recommend that you avoid running as root unless absolutely necessary +// to minimize the risk of unintended changes or malicious attacks. To run as +// root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json +// in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''. +type FunctionRunAsConfig struct { + _ struct{} `type:"structure"` + + // The group ID whose permissions are used to run a Lambda function. + Gid *int64 `type:"integer"` + + // The user ID whose permissions are used to run a Lambda function. + Uid *int64 `type:"integer"` +} + +// String returns the string representation +func (s FunctionRunAsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionRunAsConfig) GoString() string { + return s.String() +} + +// SetGid sets the Gid field's value. +func (s *FunctionRunAsConfig) SetGid(v int64) *FunctionRunAsConfig { + s.Gid = &v + return s +} + +// SetUid sets the Uid field's value. +func (s *FunctionRunAsConfig) SetUid(v int64) *FunctionRunAsConfig { + s.Uid = &v + return s +} + +type GetAssociatedRoleInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAssociatedRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAssociatedRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAssociatedRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAssociatedRoleInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *GetAssociatedRoleInput) SetGroupId(v string) *GetAssociatedRoleInput { + s.GroupId = &v + return s +} + +type GetAssociatedRoleOutput struct { + _ struct{} `type:"structure"` + + // The time when the role was associated with the group. + AssociatedAt *string `type:"string"` + + // The ARN of the role that is associated with the group. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s GetAssociatedRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAssociatedRoleOutput) GoString() string { + return s.String() +} + +// SetAssociatedAt sets the AssociatedAt field's value. +func (s *GetAssociatedRoleOutput) SetAssociatedAt(v string) *GetAssociatedRoleOutput { + s.AssociatedAt = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *GetAssociatedRoleOutput) SetRoleArn(v string) *GetAssociatedRoleOutput { + s.RoleArn = &v + return s +} + +type GetBulkDeploymentStatusInput struct { + _ struct{} `type:"structure"` + + // BulkDeploymentId is a required field + BulkDeploymentId *string `location:"uri" locationName:"BulkDeploymentId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBulkDeploymentStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBulkDeploymentStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBulkDeploymentStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBulkDeploymentStatusInput"} + if s.BulkDeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("BulkDeploymentId")) + } + if s.BulkDeploymentId != nil && len(*s.BulkDeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BulkDeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBulkDeploymentId sets the BulkDeploymentId field's value. +func (s *GetBulkDeploymentStatusInput) SetBulkDeploymentId(v string) *GetBulkDeploymentStatusInput { + s.BulkDeploymentId = &v + return s +} + +// Information about the status of a bulk deployment at the time of the request. +type GetBulkDeploymentStatusOutput struct { + _ struct{} `type:"structure"` + + // Relevant metrics on input records processed during bulk deployment. + BulkDeploymentMetrics *BulkDeploymentMetrics `type:"structure"` + + // The status of the bulk deployment. + BulkDeploymentStatus *string `type:"string" enum:"BulkDeploymentStatus"` + + // The time, in ISO format, when the deployment was created. + CreatedAt *string `type:"string"` + + // Error details + ErrorDetails []*ErrorDetail `type:"list"` + + // Error message + ErrorMessage *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetBulkDeploymentStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBulkDeploymentStatusOutput) GoString() string { + return s.String() +} + +// SetBulkDeploymentMetrics sets the BulkDeploymentMetrics field's value. +func (s *GetBulkDeploymentStatusOutput) SetBulkDeploymentMetrics(v *BulkDeploymentMetrics) *GetBulkDeploymentStatusOutput { + s.BulkDeploymentMetrics = v + return s +} + +// SetBulkDeploymentStatus sets the BulkDeploymentStatus field's value. +func (s *GetBulkDeploymentStatusOutput) SetBulkDeploymentStatus(v string) *GetBulkDeploymentStatusOutput { + s.BulkDeploymentStatus = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *GetBulkDeploymentStatusOutput) SetCreatedAt(v string) *GetBulkDeploymentStatusOutput { + s.CreatedAt = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *GetBulkDeploymentStatusOutput) SetErrorDetails(v []*ErrorDetail) *GetBulkDeploymentStatusOutput { + s.ErrorDetails = v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *GetBulkDeploymentStatusOutput) SetErrorMessage(v string) *GetBulkDeploymentStatusOutput { + s.ErrorMessage = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetBulkDeploymentStatusOutput) SetTags(v map[string]*string) *GetBulkDeploymentStatusOutput { + s.Tags = v + return s +} + +type GetConnectivityInfoInput struct { + _ struct{} `type:"structure"` + + // ThingName is a required field + ThingName *string `location:"uri" locationName:"ThingName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetConnectivityInfoInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectivityInfoInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConnectivityInfoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConnectivityInfoInput"} + if s.ThingName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingName")) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetThingName sets the ThingName field's value. +func (s *GetConnectivityInfoInput) SetThingName(v string) *GetConnectivityInfoInput { + s.ThingName = &v + return s +} + +// Information about a Greengrass core's connectivity. +type GetConnectivityInfoOutput struct { + _ struct{} `type:"structure"` + + // Connectivity info list. + ConnectivityInfo []*ConnectivityInfo `type:"list"` + + // A message about the connectivity info request. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s GetConnectivityInfoOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectivityInfoOutput) GoString() string { + return s.String() +} + +// SetConnectivityInfo sets the ConnectivityInfo field's value. +func (s *GetConnectivityInfoOutput) SetConnectivityInfo(v []*ConnectivityInfo) *GetConnectivityInfoOutput { + s.ConnectivityInfo = v + return s +} + +// SetMessage sets the Message field's value. +func (s *GetConnectivityInfoOutput) SetMessage(v string) *GetConnectivityInfoOutput { + s.Message = &v + return s +} + +type GetConnectorDefinitionInput struct { + _ struct{} `type:"structure"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetConnectorDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectorDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConnectorDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConnectorDefinitionInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *GetConnectorDefinitionInput) SetConnectorDefinitionId(v string) *GetConnectorDefinitionInput { + s.ConnectorDefinitionId = &v + return s +} + +type GetConnectorDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetConnectorDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectorDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetConnectorDefinitionOutput) SetArn(v string) *GetConnectorDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetConnectorDefinitionOutput) SetCreationTimestamp(v string) *GetConnectorDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetConnectorDefinitionOutput) SetId(v string) *GetConnectorDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetConnectorDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetConnectorDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetConnectorDefinitionOutput) SetLatestVersion(v string) *GetConnectorDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetConnectorDefinitionOutput) SetLatestVersionArn(v string) *GetConnectorDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetConnectorDefinitionOutput) SetName(v string) *GetConnectorDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetConnectorDefinitionOutput) SetTags(v map[string]*string) *GetConnectorDefinitionOutput { + s.Tags = v + return s +} + +type GetConnectorDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` + + // ConnectorDefinitionVersionId is a required field + ConnectorDefinitionVersionId *string `location:"uri" locationName:"ConnectorDefinitionVersionId" type:"string" required:"true"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s GetConnectorDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectorDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConnectorDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConnectorDefinitionVersionInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + if s.ConnectorDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionVersionId")) + } + if s.ConnectorDefinitionVersionId != nil && len(*s.ConnectorDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *GetConnectorDefinitionVersionInput) SetConnectorDefinitionId(v string) *GetConnectorDefinitionVersionInput { + s.ConnectorDefinitionId = &v + return s +} + +// SetConnectorDefinitionVersionId sets the ConnectorDefinitionVersionId field's value. +func (s *GetConnectorDefinitionVersionInput) SetConnectorDefinitionVersionId(v string) *GetConnectorDefinitionVersionInput { + s.ConnectorDefinitionVersionId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetConnectorDefinitionVersionInput) SetNextToken(v string) *GetConnectorDefinitionVersionInput { + s.NextToken = &v + return s +} + +// Information about a connector definition version. +type GetConnectorDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the connector definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the connector definition + // version was created. + CreationTimestamp *string `type:"string"` + + // Information about the connector definition version. + Definition *ConnectorDefinitionVersion `type:"structure"` + + // The ID of the connector definition version. + Id *string `type:"string"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` + + // The version of the connector definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetConnectorDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectorDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetConnectorDefinitionVersionOutput) SetArn(v string) *GetConnectorDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetConnectorDefinitionVersionOutput) SetCreationTimestamp(v string) *GetConnectorDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetConnectorDefinitionVersionOutput) SetDefinition(v *ConnectorDefinitionVersion) *GetConnectorDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetConnectorDefinitionVersionOutput) SetId(v string) *GetConnectorDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetConnectorDefinitionVersionOutput) SetNextToken(v string) *GetConnectorDefinitionVersionOutput { + s.NextToken = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetConnectorDefinitionVersionOutput) SetVersion(v string) *GetConnectorDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetCoreDefinitionInput struct { + _ struct{} `type:"structure"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCoreDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCoreDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCoreDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCoreDefinitionInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *GetCoreDefinitionInput) SetCoreDefinitionId(v string) *GetCoreDefinitionInput { + s.CoreDefinitionId = &v + return s +} + +type GetCoreDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetCoreDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCoreDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetCoreDefinitionOutput) SetArn(v string) *GetCoreDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetCoreDefinitionOutput) SetCreationTimestamp(v string) *GetCoreDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetCoreDefinitionOutput) SetId(v string) *GetCoreDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetCoreDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetCoreDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetCoreDefinitionOutput) SetLatestVersion(v string) *GetCoreDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetCoreDefinitionOutput) SetLatestVersionArn(v string) *GetCoreDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetCoreDefinitionOutput) SetName(v string) *GetCoreDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetCoreDefinitionOutput) SetTags(v map[string]*string) *GetCoreDefinitionOutput { + s.Tags = v + return s +} + +type GetCoreDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` + + // CoreDefinitionVersionId is a required field + CoreDefinitionVersionId *string `location:"uri" locationName:"CoreDefinitionVersionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCoreDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCoreDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCoreDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCoreDefinitionVersionInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + if s.CoreDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionVersionId")) + } + if s.CoreDefinitionVersionId != nil && len(*s.CoreDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *GetCoreDefinitionVersionInput) SetCoreDefinitionId(v string) *GetCoreDefinitionVersionInput { + s.CoreDefinitionId = &v + return s +} + +// SetCoreDefinitionVersionId sets the CoreDefinitionVersionId field's value. +func (s *GetCoreDefinitionVersionInput) SetCoreDefinitionVersionId(v string) *GetCoreDefinitionVersionInput { + s.CoreDefinitionVersionId = &v + return s +} + +type GetCoreDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the core definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the core definition version + // was created. + CreationTimestamp *string `type:"string"` + + // Information about the core definition version. + Definition *CoreDefinitionVersion `type:"structure"` + + // The ID of the core definition version. + Id *string `type:"string"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` + + // The version of the core definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetCoreDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCoreDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetCoreDefinitionVersionOutput) SetArn(v string) *GetCoreDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetCoreDefinitionVersionOutput) SetCreationTimestamp(v string) *GetCoreDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetCoreDefinitionVersionOutput) SetDefinition(v *CoreDefinitionVersion) *GetCoreDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetCoreDefinitionVersionOutput) SetId(v string) *GetCoreDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCoreDefinitionVersionOutput) SetNextToken(v string) *GetCoreDefinitionVersionOutput { + s.NextToken = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetCoreDefinitionVersionOutput) SetVersion(v string) *GetCoreDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetDeploymentStatusInput struct { + _ struct{} `type:"structure"` + + // DeploymentId is a required field + DeploymentId *string `location:"uri" locationName:"DeploymentId" type:"string" required:"true"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDeploymentStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentStatusInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *GetDeploymentStatusInput) SetDeploymentId(v string) *GetDeploymentStatusInput { + s.DeploymentId = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *GetDeploymentStatusInput) SetGroupId(v string) *GetDeploymentStatusInput { + s.GroupId = &v + return s +} + +// Information about the status of a deployment for a group. +type GetDeploymentStatusOutput struct { + _ struct{} `type:"structure"` + + // The status of the deployment: ''InProgress'', ''Building'', ''Success'', + // or ''Failure''. + DeploymentStatus *string `type:"string"` + + // The type of the deployment. + DeploymentType *string `type:"string" enum:"DeploymentType"` + + // Error details + ErrorDetails []*ErrorDetail `type:"list"` + + // Error message + ErrorMessage *string `type:"string"` + + // The time, in milliseconds since the epoch, when the deployment status was + // updated. + UpdatedAt *string `type:"string"` +} + +// String returns the string representation +func (s GetDeploymentStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentStatusOutput) GoString() string { + return s.String() +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *GetDeploymentStatusOutput) SetDeploymentStatus(v string) *GetDeploymentStatusOutput { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentType sets the DeploymentType field's value. +func (s *GetDeploymentStatusOutput) SetDeploymentType(v string) *GetDeploymentStatusOutput { + s.DeploymentType = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *GetDeploymentStatusOutput) SetErrorDetails(v []*ErrorDetail) *GetDeploymentStatusOutput { + s.ErrorDetails = v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *GetDeploymentStatusOutput) SetErrorMessage(v string) *GetDeploymentStatusOutput { + s.ErrorMessage = &v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *GetDeploymentStatusOutput) SetUpdatedAt(v string) *GetDeploymentStatusOutput { + s.UpdatedAt = &v + return s +} + +type GetDeviceDefinitionInput struct { + _ struct{} `type:"structure"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDeviceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceDefinitionInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *GetDeviceDefinitionInput) SetDeviceDefinitionId(v string) *GetDeviceDefinitionInput { + s.DeviceDefinitionId = &v + return s +} + +type GetDeviceDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetDeviceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetDeviceDefinitionOutput) SetArn(v string) *GetDeviceDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetDeviceDefinitionOutput) SetCreationTimestamp(v string) *GetDeviceDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetDeviceDefinitionOutput) SetId(v string) *GetDeviceDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetDeviceDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetDeviceDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetDeviceDefinitionOutput) SetLatestVersion(v string) *GetDeviceDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetDeviceDefinitionOutput) SetLatestVersionArn(v string) *GetDeviceDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetDeviceDefinitionOutput) SetName(v string) *GetDeviceDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetDeviceDefinitionOutput) SetTags(v map[string]*string) *GetDeviceDefinitionOutput { + s.Tags = v + return s +} + +type GetDeviceDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` + + // DeviceDefinitionVersionId is a required field + DeviceDefinitionVersionId *string `location:"uri" locationName:"DeviceDefinitionVersionId" type:"string" required:"true"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s GetDeviceDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceDefinitionVersionInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + if s.DeviceDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionVersionId")) + } + if s.DeviceDefinitionVersionId != nil && len(*s.DeviceDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *GetDeviceDefinitionVersionInput) SetDeviceDefinitionId(v string) *GetDeviceDefinitionVersionInput { + s.DeviceDefinitionId = &v + return s +} + +// SetDeviceDefinitionVersionId sets the DeviceDefinitionVersionId field's value. +func (s *GetDeviceDefinitionVersionInput) SetDeviceDefinitionVersionId(v string) *GetDeviceDefinitionVersionInput { + s.DeviceDefinitionVersionId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDeviceDefinitionVersionInput) SetNextToken(v string) *GetDeviceDefinitionVersionInput { + s.NextToken = &v + return s +} + +type GetDeviceDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the device definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the device definition version + // was created. + CreationTimestamp *string `type:"string"` + + // Information about the device definition version. + Definition *DeviceDefinitionVersion `type:"structure"` + + // The ID of the device definition version. + Id *string `type:"string"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` + + // The version of the device definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetDeviceDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetDeviceDefinitionVersionOutput) SetArn(v string) *GetDeviceDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetDeviceDefinitionVersionOutput) SetCreationTimestamp(v string) *GetDeviceDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetDeviceDefinitionVersionOutput) SetDefinition(v *DeviceDefinitionVersion) *GetDeviceDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetDeviceDefinitionVersionOutput) SetId(v string) *GetDeviceDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDeviceDefinitionVersionOutput) SetNextToken(v string) *GetDeviceDefinitionVersionOutput { + s.NextToken = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetDeviceDefinitionVersionOutput) SetVersion(v string) *GetDeviceDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetFunctionDefinitionInput struct { + _ struct{} `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFunctionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFunctionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFunctionDefinitionInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *GetFunctionDefinitionInput) SetFunctionDefinitionId(v string) *GetFunctionDefinitionInput { + s.FunctionDefinitionId = &v + return s +} + +type GetFunctionDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetFunctionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetFunctionDefinitionOutput) SetArn(v string) *GetFunctionDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetFunctionDefinitionOutput) SetCreationTimestamp(v string) *GetFunctionDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetFunctionDefinitionOutput) SetId(v string) *GetFunctionDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetFunctionDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetFunctionDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetFunctionDefinitionOutput) SetLatestVersion(v string) *GetFunctionDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetFunctionDefinitionOutput) SetLatestVersionArn(v string) *GetFunctionDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetFunctionDefinitionOutput) SetName(v string) *GetFunctionDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetFunctionDefinitionOutput) SetTags(v map[string]*string) *GetFunctionDefinitionOutput { + s.Tags = v + return s +} + +type GetFunctionDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` + + // FunctionDefinitionVersionId is a required field + FunctionDefinitionVersionId *string `location:"uri" locationName:"FunctionDefinitionVersionId" type:"string" required:"true"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s GetFunctionDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFunctionDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFunctionDefinitionVersionInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + if s.FunctionDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionVersionId")) + } + if s.FunctionDefinitionVersionId != nil && len(*s.FunctionDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *GetFunctionDefinitionVersionInput) SetFunctionDefinitionId(v string) *GetFunctionDefinitionVersionInput { + s.FunctionDefinitionId = &v + return s +} + +// SetFunctionDefinitionVersionId sets the FunctionDefinitionVersionId field's value. +func (s *GetFunctionDefinitionVersionInput) SetFunctionDefinitionVersionId(v string) *GetFunctionDefinitionVersionInput { + s.FunctionDefinitionVersionId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetFunctionDefinitionVersionInput) SetNextToken(v string) *GetFunctionDefinitionVersionInput { + s.NextToken = &v + return s +} + +// Information about a function definition version. +type GetFunctionDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the function definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the function definition version + // was created. + CreationTimestamp *string `type:"string"` + + // Information on the definition. + Definition *FunctionDefinitionVersion `type:"structure"` + + // The ID of the function definition version. + Id *string `type:"string"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` + + // The version of the function definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetFunctionDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetFunctionDefinitionVersionOutput) SetArn(v string) *GetFunctionDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetFunctionDefinitionVersionOutput) SetCreationTimestamp(v string) *GetFunctionDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetFunctionDefinitionVersionOutput) SetDefinition(v *FunctionDefinitionVersion) *GetFunctionDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetFunctionDefinitionVersionOutput) SetId(v string) *GetFunctionDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetFunctionDefinitionVersionOutput) SetNextToken(v string) *GetFunctionDefinitionVersionOutput { + s.NextToken = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetFunctionDefinitionVersionOutput) SetVersion(v string) *GetFunctionDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetGroupCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // CertificateAuthorityId is a required field + CertificateAuthorityId *string `location:"uri" locationName:"CertificateAuthorityId" type:"string" required:"true"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupCertificateAuthorityInput"} + if s.CertificateAuthorityId == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityId")) + } + if s.CertificateAuthorityId != nil && len(*s.CertificateAuthorityId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityId", 1)) + } + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityId sets the CertificateAuthorityId field's value. +func (s *GetGroupCertificateAuthorityInput) SetCertificateAuthorityId(v string) *GetGroupCertificateAuthorityInput { + s.CertificateAuthorityId = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *GetGroupCertificateAuthorityInput) SetGroupId(v string) *GetGroupCertificateAuthorityInput { + s.GroupId = &v + return s +} + +// Information about a certificate authority for a group. +type GetGroupCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the certificate authority for the group. + GroupCertificateAuthorityArn *string `type:"string"` + + // The ID of the certificate authority for the group. + GroupCertificateAuthorityId *string `type:"string"` + + // The PEM encoded certificate for the group. + PemEncodedCertificate *string `type:"string"` +} + +// String returns the string representation +func (s GetGroupCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetGroupCertificateAuthorityArn sets the GroupCertificateAuthorityArn field's value. +func (s *GetGroupCertificateAuthorityOutput) SetGroupCertificateAuthorityArn(v string) *GetGroupCertificateAuthorityOutput { + s.GroupCertificateAuthorityArn = &v + return s +} + +// SetGroupCertificateAuthorityId sets the GroupCertificateAuthorityId field's value. +func (s *GetGroupCertificateAuthorityOutput) SetGroupCertificateAuthorityId(v string) *GetGroupCertificateAuthorityOutput { + s.GroupCertificateAuthorityId = &v + return s +} + +// SetPemEncodedCertificate sets the PemEncodedCertificate field's value. +func (s *GetGroupCertificateAuthorityOutput) SetPemEncodedCertificate(v string) *GetGroupCertificateAuthorityOutput { + s.PemEncodedCertificate = &v + return s +} + +type GetGroupCertificateConfigurationInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupCertificateConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupCertificateConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupCertificateConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupCertificateConfigurationInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *GetGroupCertificateConfigurationInput) SetGroupId(v string) *GetGroupCertificateConfigurationInput { + s.GroupId = &v + return s +} + +type GetGroupCertificateConfigurationOutput struct { + _ struct{} `type:"structure"` + + CertificateAuthorityExpiryInMilliseconds *string `type:"string"` + + CertificateExpiryInMilliseconds *string `type:"string"` + + GroupId *string `type:"string"` +} + +// String returns the string representation +func (s GetGroupCertificateConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupCertificateConfigurationOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorityExpiryInMilliseconds sets the CertificateAuthorityExpiryInMilliseconds field's value. +func (s *GetGroupCertificateConfigurationOutput) SetCertificateAuthorityExpiryInMilliseconds(v string) *GetGroupCertificateConfigurationOutput { + s.CertificateAuthorityExpiryInMilliseconds = &v + return s +} + +// SetCertificateExpiryInMilliseconds sets the CertificateExpiryInMilliseconds field's value. +func (s *GetGroupCertificateConfigurationOutput) SetCertificateExpiryInMilliseconds(v string) *GetGroupCertificateConfigurationOutput { + s.CertificateExpiryInMilliseconds = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *GetGroupCertificateConfigurationOutput) SetGroupId(v string) *GetGroupCertificateConfigurationOutput { + s.GroupId = &v + return s +} + +type GetGroupInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *GetGroupInput) SetGroupId(v string) *GetGroupInput { + s.GroupId = &v + return s +} + +type GetGroupOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetGroupOutput) SetArn(v string) *GetGroupOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetGroupOutput) SetCreationTimestamp(v string) *GetGroupOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetGroupOutput) SetId(v string) *GetGroupOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetGroupOutput) SetLastUpdatedTimestamp(v string) *GetGroupOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetGroupOutput) SetLatestVersion(v string) *GetGroupOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetGroupOutput) SetLatestVersionArn(v string) *GetGroupOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetGroupOutput) SetName(v string) *GetGroupOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetGroupOutput) SetTags(v map[string]*string) *GetGroupOutput { + s.Tags = v + return s +} + +type GetGroupVersionInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + // GroupVersionId is a required field + GroupVersionId *string `location:"uri" locationName:"GroupVersionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupVersionInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + if s.GroupVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupVersionId")) + } + if s.GroupVersionId != nil && len(*s.GroupVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *GetGroupVersionInput) SetGroupId(v string) *GetGroupVersionInput { + s.GroupId = &v + return s +} + +// SetGroupVersionId sets the GroupVersionId field's value. +func (s *GetGroupVersionInput) SetGroupVersionId(v string) *GetGroupVersionInput { + s.GroupVersionId = &v + return s +} + +// Information about a group version. +type GetGroupVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the group version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the group version was created. + CreationTimestamp *string `type:"string"` + + // Information about the group version definition. + Definition *GroupVersion `type:"structure"` + + // The ID of the group that the version is associated with. + Id *string `type:"string"` + + // The ID of the group version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetGroupVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetGroupVersionOutput) SetArn(v string) *GetGroupVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetGroupVersionOutput) SetCreationTimestamp(v string) *GetGroupVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetGroupVersionOutput) SetDefinition(v *GroupVersion) *GetGroupVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetGroupVersionOutput) SetId(v string) *GetGroupVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetGroupVersionOutput) SetVersion(v string) *GetGroupVersionOutput { + s.Version = &v + return s +} + +type GetLoggerDefinitionInput struct { + _ struct{} `type:"structure"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLoggerDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggerDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoggerDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoggerDefinitionInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *GetLoggerDefinitionInput) SetLoggerDefinitionId(v string) *GetLoggerDefinitionInput { + s.LoggerDefinitionId = &v + return s +} + +type GetLoggerDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetLoggerDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggerDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetLoggerDefinitionOutput) SetArn(v string) *GetLoggerDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetLoggerDefinitionOutput) SetCreationTimestamp(v string) *GetLoggerDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetLoggerDefinitionOutput) SetId(v string) *GetLoggerDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetLoggerDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetLoggerDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetLoggerDefinitionOutput) SetLatestVersion(v string) *GetLoggerDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetLoggerDefinitionOutput) SetLatestVersionArn(v string) *GetLoggerDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetLoggerDefinitionOutput) SetName(v string) *GetLoggerDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetLoggerDefinitionOutput) SetTags(v map[string]*string) *GetLoggerDefinitionOutput { + s.Tags = v + return s +} + +type GetLoggerDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` + + // LoggerDefinitionVersionId is a required field + LoggerDefinitionVersionId *string `location:"uri" locationName:"LoggerDefinitionVersionId" type:"string" required:"true"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s GetLoggerDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggerDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoggerDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoggerDefinitionVersionInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + if s.LoggerDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionVersionId")) + } + if s.LoggerDefinitionVersionId != nil && len(*s.LoggerDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *GetLoggerDefinitionVersionInput) SetLoggerDefinitionId(v string) *GetLoggerDefinitionVersionInput { + s.LoggerDefinitionId = &v + return s +} + +// SetLoggerDefinitionVersionId sets the LoggerDefinitionVersionId field's value. +func (s *GetLoggerDefinitionVersionInput) SetLoggerDefinitionVersionId(v string) *GetLoggerDefinitionVersionInput { + s.LoggerDefinitionVersionId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLoggerDefinitionVersionInput) SetNextToken(v string) *GetLoggerDefinitionVersionInput { + s.NextToken = &v + return s +} + +// Information about a logger definition version. +type GetLoggerDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the logger definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the logger definition version + // was created. + CreationTimestamp *string `type:"string"` + + // Information about the logger definition version. + Definition *LoggerDefinitionVersion `type:"structure"` + + // The ID of the logger definition version. + Id *string `type:"string"` + + // The version of the logger definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetLoggerDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggerDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetLoggerDefinitionVersionOutput) SetArn(v string) *GetLoggerDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetLoggerDefinitionVersionOutput) SetCreationTimestamp(v string) *GetLoggerDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetLoggerDefinitionVersionOutput) SetDefinition(v *LoggerDefinitionVersion) *GetLoggerDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetLoggerDefinitionVersionOutput) SetId(v string) *GetLoggerDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetLoggerDefinitionVersionOutput) SetVersion(v string) *GetLoggerDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetResourceDefinitionInput struct { + _ struct{} `type:"structure"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResourceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceDefinitionInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *GetResourceDefinitionInput) SetResourceDefinitionId(v string) *GetResourceDefinitionInput { + s.ResourceDefinitionId = &v + return s +} + +type GetResourceDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetResourceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetResourceDefinitionOutput) SetArn(v string) *GetResourceDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetResourceDefinitionOutput) SetCreationTimestamp(v string) *GetResourceDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetResourceDefinitionOutput) SetId(v string) *GetResourceDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetResourceDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetResourceDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetResourceDefinitionOutput) SetLatestVersion(v string) *GetResourceDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetResourceDefinitionOutput) SetLatestVersionArn(v string) *GetResourceDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetResourceDefinitionOutput) SetName(v string) *GetResourceDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetResourceDefinitionOutput) SetTags(v map[string]*string) *GetResourceDefinitionOutput { + s.Tags = v + return s +} + +type GetResourceDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` + + // ResourceDefinitionVersionId is a required field + ResourceDefinitionVersionId *string `location:"uri" locationName:"ResourceDefinitionVersionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResourceDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceDefinitionVersionInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + if s.ResourceDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionVersionId")) + } + if s.ResourceDefinitionVersionId != nil && len(*s.ResourceDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *GetResourceDefinitionVersionInput) SetResourceDefinitionId(v string) *GetResourceDefinitionVersionInput { + s.ResourceDefinitionId = &v + return s +} + +// SetResourceDefinitionVersionId sets the ResourceDefinitionVersionId field's value. +func (s *GetResourceDefinitionVersionInput) SetResourceDefinitionVersionId(v string) *GetResourceDefinitionVersionInput { + s.ResourceDefinitionVersionId = &v + return s +} + +// Information about a resource definition version. +type GetResourceDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // Arn of the resource definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the resource definition version + // was created. + CreationTimestamp *string `type:"string"` + + // Information about the definition. + Definition *ResourceDefinitionVersion `type:"structure"` + + // The ID of the resource definition version. + Id *string `type:"string"` + + // The version of the resource definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetResourceDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetResourceDefinitionVersionOutput) SetArn(v string) *GetResourceDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetResourceDefinitionVersionOutput) SetCreationTimestamp(v string) *GetResourceDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetResourceDefinitionVersionOutput) SetDefinition(v *ResourceDefinitionVersion) *GetResourceDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetResourceDefinitionVersionOutput) SetId(v string) *GetResourceDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetResourceDefinitionVersionOutput) SetVersion(v string) *GetResourceDefinitionVersionOutput { + s.Version = &v + return s +} + +type GetServiceRoleForAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetServiceRoleForAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceRoleForAccountInput) GoString() string { + return s.String() +} + +type GetServiceRoleForAccountOutput struct { + _ struct{} `type:"structure"` + + // The time when the service role was associated with the account. + AssociatedAt *string `type:"string"` + + // The ARN of the role which is associated with the account. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s GetServiceRoleForAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceRoleForAccountOutput) GoString() string { + return s.String() +} + +// SetAssociatedAt sets the AssociatedAt field's value. +func (s *GetServiceRoleForAccountOutput) SetAssociatedAt(v string) *GetServiceRoleForAccountOutput { + s.AssociatedAt = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *GetServiceRoleForAccountOutput) SetRoleArn(v string) *GetServiceRoleForAccountOutput { + s.RoleArn = &v + return s +} + +type GetSubscriptionDefinitionInput struct { + _ struct{} `type:"structure"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSubscriptionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSubscriptionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSubscriptionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSubscriptionDefinitionInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *GetSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string) *GetSubscriptionDefinitionInput { + s.SubscriptionDefinitionId = &v + return s +} + +type GetSubscriptionDefinitionOutput struct { + _ struct{} `type:"structure"` + + Arn *string `type:"string"` + + CreationTimestamp *string `type:"string"` + + Id *string `type:"string"` + + LastUpdatedTimestamp *string `type:"string"` + + LatestVersion *string `type:"string"` + + LatestVersionArn *string `type:"string"` + + Name *string `type:"string"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetSubscriptionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSubscriptionDefinitionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetSubscriptionDefinitionOutput) SetArn(v string) *GetSubscriptionDefinitionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetSubscriptionDefinitionOutput) SetCreationTimestamp(v string) *GetSubscriptionDefinitionOutput { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GetSubscriptionDefinitionOutput) SetId(v string) *GetSubscriptionDefinitionOutput { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GetSubscriptionDefinitionOutput) SetLastUpdatedTimestamp(v string) *GetSubscriptionDefinitionOutput { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GetSubscriptionDefinitionOutput) SetLatestVersion(v string) *GetSubscriptionDefinitionOutput { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GetSubscriptionDefinitionOutput) SetLatestVersionArn(v string) *GetSubscriptionDefinitionOutput { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetSubscriptionDefinitionOutput) SetName(v string) *GetSubscriptionDefinitionOutput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetSubscriptionDefinitionOutput) SetTags(v map[string]*string) *GetSubscriptionDefinitionOutput { + s.Tags = v + return s +} + +type GetSubscriptionDefinitionVersionInput struct { + _ struct{} `type:"structure"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` + + // SubscriptionDefinitionVersionId is a required field + SubscriptionDefinitionVersionId *string `location:"uri" locationName:"SubscriptionDefinitionVersionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSubscriptionDefinitionVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSubscriptionDefinitionVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSubscriptionDefinitionVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSubscriptionDefinitionVersionInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + if s.SubscriptionDefinitionVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionVersionId")) + } + if s.SubscriptionDefinitionVersionId != nil && len(*s.SubscriptionDefinitionVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSubscriptionDefinitionVersionInput) SetNextToken(v string) *GetSubscriptionDefinitionVersionInput { + s.NextToken = &v + return s +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *GetSubscriptionDefinitionVersionInput) SetSubscriptionDefinitionId(v string) *GetSubscriptionDefinitionVersionInput { + s.SubscriptionDefinitionId = &v + return s +} + +// SetSubscriptionDefinitionVersionId sets the SubscriptionDefinitionVersionId field's value. +func (s *GetSubscriptionDefinitionVersionInput) SetSubscriptionDefinitionVersionId(v string) *GetSubscriptionDefinitionVersionInput { + s.SubscriptionDefinitionVersionId = &v + return s +} + +// Information about a subscription definition version. +type GetSubscriptionDefinitionVersionOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the subscription definition version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the subscription definition + // version was created. + CreationTimestamp *string `type:"string"` + + // Information about the subscription definition version. + Definition *SubscriptionDefinitionVersion `type:"structure"` + + // The ID of the subscription definition version. + Id *string `type:"string"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` + + // The version of the subscription definition version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s GetSubscriptionDefinitionVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSubscriptionDefinitionVersionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetArn(v string) *GetSubscriptionDefinitionVersionOutput { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetCreationTimestamp(v string) *GetSubscriptionDefinitionVersionOutput { + s.CreationTimestamp = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetDefinition(v *SubscriptionDefinitionVersion) *GetSubscriptionDefinitionVersionOutput { + s.Definition = v + return s +} + +// SetId sets the Id field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetId(v string) *GetSubscriptionDefinitionVersionOutput { + s.Id = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetNextToken(v string) *GetSubscriptionDefinitionVersionOutput { + s.NextToken = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetSubscriptionDefinitionVersionOutput) SetVersion(v string) *GetSubscriptionDefinitionVersionOutput { + s.Version = &v + return s +} + +// Information about a certificate authority for a group. +type GroupCertificateAuthorityProperties struct { + _ struct{} `type:"structure"` + + // The ARN of the certificate authority for the group. + GroupCertificateAuthorityArn *string `type:"string"` + + // The ID of the certificate authority for the group. + GroupCertificateAuthorityId *string `type:"string"` +} + +// String returns the string representation +func (s GroupCertificateAuthorityProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupCertificateAuthorityProperties) GoString() string { + return s.String() +} + +// SetGroupCertificateAuthorityArn sets the GroupCertificateAuthorityArn field's value. +func (s *GroupCertificateAuthorityProperties) SetGroupCertificateAuthorityArn(v string) *GroupCertificateAuthorityProperties { + s.GroupCertificateAuthorityArn = &v + return s +} + +// SetGroupCertificateAuthorityId sets the GroupCertificateAuthorityId field's value. +func (s *GroupCertificateAuthorityProperties) SetGroupCertificateAuthorityId(v string) *GroupCertificateAuthorityProperties { + s.GroupCertificateAuthorityId = &v + return s +} + +// Information about a group. +type GroupInformation struct { + _ struct{} `type:"structure"` + + // The ARN of the group. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the group was created. + CreationTimestamp *string `type:"string"` + + // The ID of the group. + Id *string `type:"string"` + + // The time, in milliseconds since the epoch, when the group was last updated. + LastUpdatedTimestamp *string `type:"string"` + + // The ID of the latest version associated with the group. + LatestVersion *string `type:"string"` + + // The ARN of the latest version associated with the group. + LatestVersionArn *string `type:"string"` + + // The name of the group. + Name *string `type:"string"` +} + +// String returns the string representation +func (s GroupInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupInformation) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GroupInformation) SetArn(v string) *GroupInformation { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *GroupInformation) SetCreationTimestamp(v string) *GroupInformation { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *GroupInformation) SetId(v string) *GroupInformation { + s.Id = &v + return s +} + +// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. +func (s *GroupInformation) SetLastUpdatedTimestamp(v string) *GroupInformation { + s.LastUpdatedTimestamp = &v + return s +} + +// SetLatestVersion sets the LatestVersion field's value. +func (s *GroupInformation) SetLatestVersion(v string) *GroupInformation { + s.LatestVersion = &v + return s +} + +// SetLatestVersionArn sets the LatestVersionArn field's value. +func (s *GroupInformation) SetLatestVersionArn(v string) *GroupInformation { + s.LatestVersionArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *GroupInformation) SetName(v string) *GroupInformation { + s.Name = &v + return s +} + +// Group owner related settings for local resources. +type GroupOwnerSetting struct { + _ struct{} `type:"structure"` + + // If true, AWS IoT Greengrass automatically adds the specified Linux OS group + // owner of the resource to the Lambda process privileges. Thus the Lambda process + // will have the file access permissions of the added Linux group. + AutoAddGroupOwner *bool `type:"boolean"` + + // The name of the Linux OS group whose privileges will be added to the Lambda + // process. This field is optional. + GroupOwner *string `type:"string"` +} + +// String returns the string representation +func (s GroupOwnerSetting) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupOwnerSetting) GoString() string { + return s.String() +} + +// SetAutoAddGroupOwner sets the AutoAddGroupOwner field's value. +func (s *GroupOwnerSetting) SetAutoAddGroupOwner(v bool) *GroupOwnerSetting { + s.AutoAddGroupOwner = &v + return s +} + +// SetGroupOwner sets the GroupOwner field's value. +func (s *GroupOwnerSetting) SetGroupOwner(v string) *GroupOwnerSetting { + s.GroupOwner = &v + return s +} + +// Information about a group version. +type GroupVersion struct { + _ struct{} `type:"structure"` + + // The ARN of the connector definition version for this group. + ConnectorDefinitionVersionArn *string `type:"string"` + + // The ARN of the core definition version for this group. + CoreDefinitionVersionArn *string `type:"string"` + + // The ARN of the device definition version for this group. + DeviceDefinitionVersionArn *string `type:"string"` + + // The ARN of the function definition version for this group. + FunctionDefinitionVersionArn *string `type:"string"` + + // The ARN of the logger definition version for this group. + LoggerDefinitionVersionArn *string `type:"string"` + + // The ARN of the resource definition version for this group. + ResourceDefinitionVersionArn *string `type:"string"` + + // The ARN of the subscription definition version for this group. + SubscriptionDefinitionVersionArn *string `type:"string"` +} + +// String returns the string representation +func (s GroupVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupVersion) GoString() string { + return s.String() +} + +// SetConnectorDefinitionVersionArn sets the ConnectorDefinitionVersionArn field's value. +func (s *GroupVersion) SetConnectorDefinitionVersionArn(v string) *GroupVersion { + s.ConnectorDefinitionVersionArn = &v + return s +} + +// SetCoreDefinitionVersionArn sets the CoreDefinitionVersionArn field's value. +func (s *GroupVersion) SetCoreDefinitionVersionArn(v string) *GroupVersion { + s.CoreDefinitionVersionArn = &v + return s +} + +// SetDeviceDefinitionVersionArn sets the DeviceDefinitionVersionArn field's value. +func (s *GroupVersion) SetDeviceDefinitionVersionArn(v string) *GroupVersion { + s.DeviceDefinitionVersionArn = &v + return s +} + +// SetFunctionDefinitionVersionArn sets the FunctionDefinitionVersionArn field's value. +func (s *GroupVersion) SetFunctionDefinitionVersionArn(v string) *GroupVersion { + s.FunctionDefinitionVersionArn = &v + return s +} + +// SetLoggerDefinitionVersionArn sets the LoggerDefinitionVersionArn field's value. +func (s *GroupVersion) SetLoggerDefinitionVersionArn(v string) *GroupVersion { + s.LoggerDefinitionVersionArn = &v + return s +} + +// SetResourceDefinitionVersionArn sets the ResourceDefinitionVersionArn field's value. +func (s *GroupVersion) SetResourceDefinitionVersionArn(v string) *GroupVersion { + s.ResourceDefinitionVersionArn = &v + return s +} + +// SetSubscriptionDefinitionVersionArn sets the SubscriptionDefinitionVersionArn field's value. +func (s *GroupVersion) SetSubscriptionDefinitionVersionArn(v string) *GroupVersion { + s.SubscriptionDefinitionVersionArn = &v + return s +} + +type ListBulkDeploymentDetailedReportsInput struct { + _ struct{} `type:"structure"` + + // BulkDeploymentId is a required field + BulkDeploymentId *string `location:"uri" locationName:"BulkDeploymentId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListBulkDeploymentDetailedReportsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBulkDeploymentDetailedReportsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBulkDeploymentDetailedReportsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBulkDeploymentDetailedReportsInput"} + if s.BulkDeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("BulkDeploymentId")) + } + if s.BulkDeploymentId != nil && len(*s.BulkDeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BulkDeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBulkDeploymentId sets the BulkDeploymentId field's value. +func (s *ListBulkDeploymentDetailedReportsInput) SetBulkDeploymentId(v string) *ListBulkDeploymentDetailedReportsInput { + s.BulkDeploymentId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBulkDeploymentDetailedReportsInput) SetMaxResults(v string) *ListBulkDeploymentDetailedReportsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBulkDeploymentDetailedReportsInput) SetNextToken(v string) *ListBulkDeploymentDetailedReportsInput { + s.NextToken = &v + return s +} + +type ListBulkDeploymentDetailedReportsOutput struct { + _ struct{} `type:"structure"` + + // A list of the individual group deployments in the bulk deployment operation. + Deployments []*BulkDeploymentResult `type:"list"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBulkDeploymentDetailedReportsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBulkDeploymentDetailedReportsOutput) GoString() string { + return s.String() +} + +// SetDeployments sets the Deployments field's value. +func (s *ListBulkDeploymentDetailedReportsOutput) SetDeployments(v []*BulkDeploymentResult) *ListBulkDeploymentDetailedReportsOutput { + s.Deployments = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBulkDeploymentDetailedReportsOutput) SetNextToken(v string) *ListBulkDeploymentDetailedReportsOutput { + s.NextToken = &v + return s +} + +type ListBulkDeploymentsInput 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 ListBulkDeploymentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBulkDeploymentsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBulkDeploymentsInput) SetMaxResults(v string) *ListBulkDeploymentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBulkDeploymentsInput) SetNextToken(v string) *ListBulkDeploymentsInput { + s.NextToken = &v + return s +} + +type ListBulkDeploymentsOutput struct { + _ struct{} `type:"structure"` + + // A list of bulk deployments. + BulkDeployments []*BulkDeployment `type:"list"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBulkDeploymentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBulkDeploymentsOutput) GoString() string { + return s.String() +} + +// SetBulkDeployments sets the BulkDeployments field's value. +func (s *ListBulkDeploymentsOutput) SetBulkDeployments(v []*BulkDeployment) *ListBulkDeploymentsOutput { + s.BulkDeployments = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBulkDeploymentsOutput) SetNextToken(v string) *ListBulkDeploymentsOutput { + s.NextToken = &v + return s +} + +type ListConnectorDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListConnectorDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectorDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListConnectorDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListConnectorDefinitionVersionsInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *ListConnectorDefinitionVersionsInput) SetConnectorDefinitionId(v string) *ListConnectorDefinitionVersionsInput { + s.ConnectorDefinitionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListConnectorDefinitionVersionsInput) SetMaxResults(v string) *ListConnectorDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectorDefinitionVersionsInput) SetNextToken(v string) *ListConnectorDefinitionVersionsInput { + s.NextToken = &v + return s +} + +type ListConnectorDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListConnectorDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectorDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectorDefinitionVersionsOutput) SetNextToken(v string) *ListConnectorDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListConnectorDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListConnectorDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListConnectorDefinitionsInput 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 ListConnectorDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectorDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListConnectorDefinitionsInput) SetMaxResults(v string) *ListConnectorDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectorDefinitionsInput) SetNextToken(v string) *ListConnectorDefinitionsInput { + s.NextToken = &v + return s +} + +type ListConnectorDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListConnectorDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectorDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListConnectorDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListConnectorDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectorDefinitionsOutput) SetNextToken(v string) *ListConnectorDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListCoreDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListCoreDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCoreDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCoreDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCoreDefinitionVersionsInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *ListCoreDefinitionVersionsInput) SetCoreDefinitionId(v string) *ListCoreDefinitionVersionsInput { + s.CoreDefinitionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCoreDefinitionVersionsInput) SetMaxResults(v string) *ListCoreDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCoreDefinitionVersionsInput) SetNextToken(v string) *ListCoreDefinitionVersionsInput { + s.NextToken = &v + return s +} + +type ListCoreDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListCoreDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCoreDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCoreDefinitionVersionsOutput) SetNextToken(v string) *ListCoreDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListCoreDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListCoreDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListCoreDefinitionsInput 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 ListCoreDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCoreDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCoreDefinitionsInput) SetMaxResults(v string) *ListCoreDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCoreDefinitionsInput) SetNextToken(v string) *ListCoreDefinitionsInput { + s.NextToken = &v + return s +} + +type ListCoreDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListCoreDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCoreDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListCoreDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListCoreDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCoreDefinitionsOutput) SetNextToken(v string) *ListCoreDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListDeploymentsInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListDeploymentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeploymentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeploymentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeploymentsInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *ListDeploymentsInput) SetGroupId(v string) *ListDeploymentsInput { + s.GroupId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeploymentsInput) SetMaxResults(v string) *ListDeploymentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeploymentsInput) SetNextToken(v string) *ListDeploymentsInput { + s.NextToken = &v + return s +} + +type ListDeploymentsOutput struct { + _ struct{} `type:"structure"` + + // A list of deployments for the requested groups. + Deployments []*Deployment `type:"list"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDeploymentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeploymentsOutput) GoString() string { + return s.String() +} + +// SetDeployments sets the Deployments field's value. +func (s *ListDeploymentsOutput) SetDeployments(v []*Deployment) *ListDeploymentsOutput { + s.Deployments = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeploymentsOutput) SetNextToken(v string) *ListDeploymentsOutput { + s.NextToken = &v + return s +} + +type ListDeviceDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListDeviceDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeviceDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeviceDefinitionVersionsInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *ListDeviceDefinitionVersionsInput) SetDeviceDefinitionId(v string) *ListDeviceDefinitionVersionsInput { + s.DeviceDefinitionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeviceDefinitionVersionsInput) SetMaxResults(v string) *ListDeviceDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceDefinitionVersionsInput) SetNextToken(v string) *ListDeviceDefinitionVersionsInput { + s.NextToken = &v + return s +} + +type ListDeviceDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListDeviceDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceDefinitionVersionsOutput) SetNextToken(v string) *ListDeviceDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListDeviceDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListDeviceDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListDeviceDefinitionsInput 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 ListDeviceDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeviceDefinitionsInput) SetMaxResults(v string) *ListDeviceDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceDefinitionsInput) SetNextToken(v string) *ListDeviceDefinitionsInput { + s.NextToken = &v + return s +} + +type ListDeviceDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDeviceDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListDeviceDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListDeviceDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceDefinitionsOutput) SetNextToken(v string) *ListDeviceDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListFunctionDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListFunctionDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFunctionDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFunctionDefinitionVersionsInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *ListFunctionDefinitionVersionsInput) SetFunctionDefinitionId(v string) *ListFunctionDefinitionVersionsInput { + s.FunctionDefinitionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFunctionDefinitionVersionsInput) SetMaxResults(v string) *ListFunctionDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionDefinitionVersionsInput) SetNextToken(v string) *ListFunctionDefinitionVersionsInput { + s.NextToken = &v + return s +} + +type ListFunctionDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListFunctionDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionDefinitionVersionsOutput) SetNextToken(v string) *ListFunctionDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListFunctionDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListFunctionDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListFunctionDefinitionsInput 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 ListFunctionDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFunctionDefinitionsInput) SetMaxResults(v string) *ListFunctionDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionDefinitionsInput) SetNextToken(v string) *ListFunctionDefinitionsInput { + s.NextToken = &v + return s +} + +type ListFunctionDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListFunctionDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListFunctionDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListFunctionDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionDefinitionsOutput) SetNextToken(v string) *ListFunctionDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListGroupCertificateAuthoritiesInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListGroupCertificateAuthoritiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupCertificateAuthoritiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupCertificateAuthoritiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupCertificateAuthoritiesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *ListGroupCertificateAuthoritiesInput) SetGroupId(v string) *ListGroupCertificateAuthoritiesInput { + s.GroupId = &v + return s +} + +type ListGroupCertificateAuthoritiesOutput struct { + _ struct{} `type:"structure"` + + // A list of certificate authorities associated with the group. + GroupCertificateAuthorities []*GroupCertificateAuthorityProperties `type:"list"` +} + +// String returns the string representation +func (s ListGroupCertificateAuthoritiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupCertificateAuthoritiesOutput) GoString() string { + return s.String() +} + +// SetGroupCertificateAuthorities sets the GroupCertificateAuthorities field's value. +func (s *ListGroupCertificateAuthoritiesOutput) SetGroupCertificateAuthorities(v []*GroupCertificateAuthorityProperties) *ListGroupCertificateAuthoritiesOutput { + s.GroupCertificateAuthorities = v + return s +} + +type ListGroupVersionsInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListGroupVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupVersionsInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *ListGroupVersionsInput) SetGroupId(v string) *ListGroupVersionsInput { + s.GroupId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupVersionsInput) SetMaxResults(v string) *ListGroupVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupVersionsInput) SetNextToken(v string) *ListGroupVersionsInput { + s.NextToken = &v + return s +} + +type ListGroupVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListGroupVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupVersionsOutput) SetNextToken(v string) *ListGroupVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListGroupVersionsOutput) SetVersions(v []*VersionInformation) *ListGroupVersionsOutput { + s.Versions = v + return s +} + +type ListGroupsInput 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 ListGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupsInput) SetMaxResults(v string) *ListGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { + s.NextToken = &v + return s +} + +type ListGroupsOutput struct { + _ struct{} `type:"structure"` + + // Information about a group. + Groups []*GroupInformation `type:"list"` + + // The token for the next set of results, or ''null'' if there are no additional + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupsOutput) GoString() string { + return s.String() +} + +// SetGroups sets the Groups field's value. +func (s *ListGroupsOutput) SetGroups(v []*GroupInformation) *ListGroupsOutput { + s.Groups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { + s.NextToken = &v + return s +} + +type ListLoggerDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` +} + +// String returns the string representation +func (s ListLoggerDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggerDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLoggerDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLoggerDefinitionVersionsInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *ListLoggerDefinitionVersionsInput) SetLoggerDefinitionId(v string) *ListLoggerDefinitionVersionsInput { + s.LoggerDefinitionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLoggerDefinitionVersionsInput) SetMaxResults(v string) *ListLoggerDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLoggerDefinitionVersionsInput) SetNextToken(v string) *ListLoggerDefinitionVersionsInput { + s.NextToken = &v + return s +} + +type ListLoggerDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListLoggerDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggerDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLoggerDefinitionVersionsOutput) SetNextToken(v string) *ListLoggerDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListLoggerDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListLoggerDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListLoggerDefinitionsInput 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 ListLoggerDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggerDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLoggerDefinitionsInput) SetMaxResults(v string) *ListLoggerDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLoggerDefinitionsInput) SetNextToken(v string) *ListLoggerDefinitionsInput { + s.NextToken = &v + return s +} + +type ListLoggerDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLoggerDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggerDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListLoggerDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListLoggerDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLoggerDefinitionsOutput) SetNextToken(v string) *ListLoggerDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListResourceDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListResourceDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourceDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourceDefinitionVersionsInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResourceDefinitionVersionsInput) SetMaxResults(v string) *ListResourceDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceDefinitionVersionsInput) SetNextToken(v string) *ListResourceDefinitionVersionsInput { + s.NextToken = &v + return s +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *ListResourceDefinitionVersionsInput) SetResourceDefinitionId(v string) *ListResourceDefinitionVersionsInput { + s.ResourceDefinitionId = &v + return s +} + +type ListResourceDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListResourceDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceDefinitionVersionsOutput) SetNextToken(v string) *ListResourceDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListResourceDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListResourceDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListResourceDefinitionsInput 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 ListResourceDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResourceDefinitionsInput) SetMaxResults(v string) *ListResourceDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceDefinitionsInput) SetNextToken(v string) *ListResourceDefinitionsInput { + s.NextToken = &v + return s +} + +type ListResourceDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResourceDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListResourceDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListResourceDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceDefinitionsOutput) SetNextToken(v string) *ListResourceDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListSubscriptionDefinitionVersionsInput struct { + _ struct{} `type:"structure"` + + MaxResults *string `location:"querystring" locationName:"MaxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListSubscriptionDefinitionVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscriptionDefinitionVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSubscriptionDefinitionVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSubscriptionDefinitionVersionsInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSubscriptionDefinitionVersionsInput) SetMaxResults(v string) *ListSubscriptionDefinitionVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscriptionDefinitionVersionsInput) SetNextToken(v string) *ListSubscriptionDefinitionVersionsInput { + s.NextToken = &v + return s +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *ListSubscriptionDefinitionVersionsInput) SetSubscriptionDefinitionId(v string) *ListSubscriptionDefinitionVersionsInput { + s.SubscriptionDefinitionId = &v + return s +} + +type ListSubscriptionDefinitionVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + Versions []*VersionInformation `type:"list"` +} + +// String returns the string representation +func (s ListSubscriptionDefinitionVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscriptionDefinitionVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscriptionDefinitionVersionsOutput) SetNextToken(v string) *ListSubscriptionDefinitionVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListSubscriptionDefinitionVersionsOutput) SetVersions(v []*VersionInformation) *ListSubscriptionDefinitionVersionsOutput { + s.Versions = v + return s +} + +type ListSubscriptionDefinitionsInput 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 ListSubscriptionDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscriptionDefinitionsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSubscriptionDefinitionsInput) SetMaxResults(v string) *ListSubscriptionDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscriptionDefinitionsInput) SetNextToken(v string) *ListSubscriptionDefinitionsInput { + s.NextToken = &v + return s +} + +type ListSubscriptionDefinitionsOutput struct { + _ struct{} `type:"structure"` + + Definitions []*DefinitionInformation `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListSubscriptionDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscriptionDefinitionsOutput) GoString() string { + return s.String() +} + +// SetDefinitions sets the Definitions field's value. +func (s *ListSubscriptionDefinitionsOutput) SetDefinitions(v []*DefinitionInformation) *ListSubscriptionDefinitionsOutput { + s.Definitions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscriptionDefinitionsOutput) SetNextToken(v string) *ListSubscriptionDefinitionsOutput { + s.NextToken = &v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.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 key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" 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 +} + +// Attributes that define a local device resource. +type LocalDeviceResourceData struct { + _ struct{} `type:"structure"` + + // Group/owner related settings for local resources. + GroupOwnerSetting *GroupOwnerSetting `type:"structure"` + + // The local absolute path of the device resource. The source path for a device + // resource can refer only to a character device or block device under ''/dev''. + SourcePath *string `type:"string"` +} + +// String returns the string representation +func (s LocalDeviceResourceData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LocalDeviceResourceData) GoString() string { + return s.String() +} + +// SetGroupOwnerSetting sets the GroupOwnerSetting field's value. +func (s *LocalDeviceResourceData) SetGroupOwnerSetting(v *GroupOwnerSetting) *LocalDeviceResourceData { + s.GroupOwnerSetting = v + return s +} + +// SetSourcePath sets the SourcePath field's value. +func (s *LocalDeviceResourceData) SetSourcePath(v string) *LocalDeviceResourceData { + s.SourcePath = &v + return s +} + +// Attributes that define a local volume resource. +type LocalVolumeResourceData struct { + _ struct{} `type:"structure"` + + // The absolute local path of the resource inside the Lambda environment. + DestinationPath *string `type:"string"` + + // Allows you to configure additional group privileges for the Lambda process. + // This field is optional. + GroupOwnerSetting *GroupOwnerSetting `type:"structure"` + + // The local absolute path of the volume resource on the host. The source path + // for a volume resource type cannot start with ''/sys''. + SourcePath *string `type:"string"` +} + +// String returns the string representation +func (s LocalVolumeResourceData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LocalVolumeResourceData) GoString() string { + return s.String() +} + +// SetDestinationPath sets the DestinationPath field's value. +func (s *LocalVolumeResourceData) SetDestinationPath(v string) *LocalVolumeResourceData { + s.DestinationPath = &v + return s +} + +// SetGroupOwnerSetting sets the GroupOwnerSetting field's value. +func (s *LocalVolumeResourceData) SetGroupOwnerSetting(v *GroupOwnerSetting) *LocalVolumeResourceData { + s.GroupOwnerSetting = v + return s +} + +// SetSourcePath sets the SourcePath field's value. +func (s *LocalVolumeResourceData) SetSourcePath(v string) *LocalVolumeResourceData { + s.SourcePath = &v + return s +} + +// Information about a logger +type Logger struct { + _ struct{} `type:"structure"` + + // The component that will be subject to logging. + // + // Component is a required field + Component *string `type:"string" required:"true" enum:"LoggerComponent"` + + // A descriptive or arbitrary ID for the logger. This value must be unique within + // the logger definition version. Max length is 128 characters with pattern + // ''[a-zA-Z0-9:_-]+''. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The level of the logs. + // + // Level is a required field + Level *string `type:"string" required:"true" enum:"LoggerLevel"` + + // The amount of file space, in KB, to use if the local file system is used + // for logging purposes. + Space *int64 `type:"integer"` + + // The type of log output which will be used. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"LoggerType"` +} + +// String returns the string representation +func (s Logger) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Logger) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Logger) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Logger"} + if s.Component == nil { + invalidParams.Add(request.NewErrParamRequired("Component")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Level == nil { + invalidParams.Add(request.NewErrParamRequired("Level")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComponent sets the Component field's value. +func (s *Logger) SetComponent(v string) *Logger { + s.Component = &v + return s +} + +// SetId sets the Id field's value. +func (s *Logger) SetId(v string) *Logger { + s.Id = &v + return s +} + +// SetLevel sets the Level field's value. +func (s *Logger) SetLevel(v string) *Logger { + s.Level = &v + return s +} + +// SetSpace sets the Space field's value. +func (s *Logger) SetSpace(v int64) *Logger { + s.Space = &v + return s +} + +// SetType sets the Type field's value. +func (s *Logger) SetType(v string) *Logger { + s.Type = &v + return s +} + +// Information about a logger definition version. +type LoggerDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of loggers. + Loggers []*Logger `type:"list"` +} + +// String returns the string representation +func (s LoggerDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoggerDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggerDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggerDefinitionVersion"} + if s.Loggers != nil { + for i, v := range s.Loggers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Loggers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggers sets the Loggers field's value. +func (s *LoggerDefinitionVersion) SetLoggers(v []*Logger) *LoggerDefinitionVersion { + s.Loggers = v + return s +} + +// Information about a group reset request. +type ResetDeploymentsInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // If true, performs a best-effort only core reset. + Force *bool `type:"boolean"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ResetDeploymentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDeploymentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDeploymentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDeploymentsInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *ResetDeploymentsInput) SetAmznClientToken(v string) *ResetDeploymentsInput { + s.AmznClientToken = &v + return s +} + +// SetForce sets the Force field's value. +func (s *ResetDeploymentsInput) SetForce(v bool) *ResetDeploymentsInput { + s.Force = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *ResetDeploymentsInput) SetGroupId(v string) *ResetDeploymentsInput { + s.GroupId = &v + return s +} + +type ResetDeploymentsOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the deployment. + DeploymentArn *string `type:"string"` + + // The ID of the deployment. + DeploymentId *string `type:"string"` +} + +// String returns the string representation +func (s ResetDeploymentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDeploymentsOutput) GoString() string { + return s.String() +} + +// SetDeploymentArn sets the DeploymentArn field's value. +func (s *ResetDeploymentsOutput) SetDeploymentArn(v string) *ResetDeploymentsOutput { + s.DeploymentArn = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *ResetDeploymentsOutput) SetDeploymentId(v string) *ResetDeploymentsOutput { + s.DeploymentId = &v + return s +} + +// Information about a resource. +type Resource struct { + _ struct{} `type:"structure"` + + // The resource ID, used to refer to a resource in the Lambda function configuration. + // Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must + // be unique within a Greengrass group. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The descriptive resource name, which is displayed on the AWS IoT Greengrass + // console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This + // must be unique within a Greengrass group. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // A container of data for all resource types. + // + // ResourceDataContainer is a required field + ResourceDataContainer *ResourceDataContainer `type:"structure" required:"true"` +} + +// String returns the string representation +func (s Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Resource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Resource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Resource"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ResourceDataContainer == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDataContainer")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *Resource) SetId(v string) *Resource { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *Resource) SetName(v string) *Resource { + s.Name = &v + return s +} + +// SetResourceDataContainer sets the ResourceDataContainer field's value. +func (s *Resource) SetResourceDataContainer(v *ResourceDataContainer) *Resource { + s.ResourceDataContainer = v + return s +} + +// A policy used by the function to access a resource. +type ResourceAccessPolicy struct { + _ struct{} `type:"structure"` + + // The permissions that the Lambda function has to the resource. Can be one + // of ''rw'' (read/write) or ''ro'' (read-only). + Permission *string `type:"string" enum:"Permission"` + + // The ID of the resource. (This ID is assigned to the resource when you create + // the resource definiton.) + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResourceAccessPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceAccessPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceAccessPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceAccessPolicy"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPermission sets the Permission field's value. +func (s *ResourceAccessPolicy) SetPermission(v string) *ResourceAccessPolicy { + s.Permission = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ResourceAccessPolicy) SetResourceId(v string) *ResourceAccessPolicy { + s.ResourceId = &v + return s +} + +// A container for resource data. The container takes only one of the following +// supported resource data types: ''LocalDeviceResourceData'', ''LocalVolumeResourceData'', +// ''SageMakerMachineLearningModelResourceData'', ''S3MachineLearningModelResourceData'', +// ''SecretsManagerSecretResourceData''. +type ResourceDataContainer struct { + _ struct{} `type:"structure"` + + // Attributes that define the local device resource. + LocalDeviceResourceData *LocalDeviceResourceData `type:"structure"` + + // Attributes that define the local volume resource. + LocalVolumeResourceData *LocalVolumeResourceData `type:"structure"` + + // Attributes that define an Amazon S3 machine learning resource. + S3MachineLearningModelResourceData *S3MachineLearningModelResourceData `type:"structure"` + + // Attributes that define an Amazon SageMaker machine learning resource. + SageMakerMachineLearningModelResourceData *SageMakerMachineLearningModelResourceData `type:"structure"` + + // Attributes that define a secret resource, which references a secret from + // AWS Secrets Manager. + SecretsManagerSecretResourceData *SecretsManagerSecretResourceData `type:"structure"` +} + +// String returns the string representation +func (s ResourceDataContainer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceDataContainer) GoString() string { + return s.String() +} + +// SetLocalDeviceResourceData sets the LocalDeviceResourceData field's value. +func (s *ResourceDataContainer) SetLocalDeviceResourceData(v *LocalDeviceResourceData) *ResourceDataContainer { + s.LocalDeviceResourceData = v + return s +} + +// SetLocalVolumeResourceData sets the LocalVolumeResourceData field's value. +func (s *ResourceDataContainer) SetLocalVolumeResourceData(v *LocalVolumeResourceData) *ResourceDataContainer { + s.LocalVolumeResourceData = v + return s +} + +// SetS3MachineLearningModelResourceData sets the S3MachineLearningModelResourceData field's value. +func (s *ResourceDataContainer) SetS3MachineLearningModelResourceData(v *S3MachineLearningModelResourceData) *ResourceDataContainer { + s.S3MachineLearningModelResourceData = v + return s +} + +// SetSageMakerMachineLearningModelResourceData sets the SageMakerMachineLearningModelResourceData field's value. +func (s *ResourceDataContainer) SetSageMakerMachineLearningModelResourceData(v *SageMakerMachineLearningModelResourceData) *ResourceDataContainer { + s.SageMakerMachineLearningModelResourceData = v + return s +} + +// SetSecretsManagerSecretResourceData sets the SecretsManagerSecretResourceData field's value. +func (s *ResourceDataContainer) SetSecretsManagerSecretResourceData(v *SecretsManagerSecretResourceData) *ResourceDataContainer { + s.SecretsManagerSecretResourceData = v + return s +} + +// Information about a resource definition version. +type ResourceDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of resources. + Resources []*Resource `type:"list"` +} + +// String returns the string representation +func (s ResourceDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceDefinitionVersion"} + if s.Resources != nil { + for i, v := range s.Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResources sets the Resources field's value. +func (s *ResourceDefinitionVersion) SetResources(v []*Resource) *ResourceDefinitionVersion { + s.Resources = v + return s +} + +// Attributes that define an Amazon S3 machine learning resource. +type S3MachineLearningModelResourceData struct { + _ struct{} `type:"structure"` + + // The absolute local path of the resource inside the Lambda environment. + DestinationPath *string `type:"string"` + + // The URI of the source model in an S3 bucket. The model package must be in + // tar.gz or .zip format. + S3Uri *string `type:"string"` +} + +// String returns the string representation +func (s S3MachineLearningModelResourceData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3MachineLearningModelResourceData) GoString() string { + return s.String() +} + +// SetDestinationPath sets the DestinationPath field's value. +func (s *S3MachineLearningModelResourceData) SetDestinationPath(v string) *S3MachineLearningModelResourceData { + s.DestinationPath = &v + return s +} + +// SetS3Uri sets the S3Uri field's value. +func (s *S3MachineLearningModelResourceData) SetS3Uri(v string) *S3MachineLearningModelResourceData { + s.S3Uri = &v + return s +} + +// Attributes that define an Amazon SageMaker machine learning resource. +type SageMakerMachineLearningModelResourceData struct { + _ struct{} `type:"structure"` + + // The absolute local path of the resource inside the Lambda environment. + DestinationPath *string `type:"string"` + + // The ARN of the Amazon SageMaker training job that represents the source model. + SageMakerJobArn *string `type:"string"` +} + +// String returns the string representation +func (s SageMakerMachineLearningModelResourceData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SageMakerMachineLearningModelResourceData) GoString() string { + return s.String() +} + +// SetDestinationPath sets the DestinationPath field's value. +func (s *SageMakerMachineLearningModelResourceData) SetDestinationPath(v string) *SageMakerMachineLearningModelResourceData { + s.DestinationPath = &v + return s +} + +// SetSageMakerJobArn sets the SageMakerJobArn field's value. +func (s *SageMakerMachineLearningModelResourceData) SetSageMakerJobArn(v string) *SageMakerMachineLearningModelResourceData { + s.SageMakerJobArn = &v + return s +} + +// Attributes that define a secret resource, which references a secret from +// AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of +// the secret on the Greengrass core, where it can be securely accessed by connectors +// and Lambda functions. +type SecretsManagerSecretResourceData struct { + _ struct{} `type:"structure"` + + // The ARN of the Secrets Manager secret to make available on the core. The + // value of the secret's latest version (represented by the ''AWSCURRENT'' staging + // label) is included by default. + ARN *string `type:"string"` + + // Optional. The staging labels whose values you want to make available on the + // core, in addition to ''AWSCURRENT''. + AdditionalStagingLabelsToDownload []*string `type:"list"` +} + +// String returns the string representation +func (s SecretsManagerSecretResourceData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecretsManagerSecretResourceData) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *SecretsManagerSecretResourceData) SetARN(v string) *SecretsManagerSecretResourceData { + s.ARN = &v + return s +} + +// SetAdditionalStagingLabelsToDownload sets the AdditionalStagingLabelsToDownload field's value. +func (s *SecretsManagerSecretResourceData) SetAdditionalStagingLabelsToDownload(v []*string) *SecretsManagerSecretResourceData { + s.AdditionalStagingLabelsToDownload = v + return s +} + +// Information about a bulk deployment. You cannot start a new bulk deployment +// while another one is still running or in a non-terminal state. +type StartBulkDeploymentInput struct { + _ struct{} `type:"structure"` + + AmznClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" type:"string"` + + // The ARN of the execution role to associate with the bulk deployment operation. + // This IAM role must allow the ''greengrass:CreateDeployment'' action for all + // group versions that are listed in the input file. This IAM role must have + // access to the S3 bucket containing the input file. + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `type:"string" required:"true"` + + // The URI of the input file contained in the S3 bucket. The execution role + // must have ''getObject'' permissions on this bucket to access the input file. + // The input file is a JSON-serialized, line delimited file with UTF-8 encoding + // that provides a list of group and version IDs and the deployment type. This + // file must be less than 100 MB. Currently, AWS IoT Greengrass supports only + // ''NewDeployment'' deployment types. + // + // InputFileUri is a required field + InputFileUri *string `type:"string" required:"true"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s StartBulkDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartBulkDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartBulkDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartBulkDeploymentInput"} + if s.ExecutionRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) + } + if s.InputFileUri == nil { + invalidParams.Add(request.NewErrParamRequired("InputFileUri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmznClientToken sets the AmznClientToken field's value. +func (s *StartBulkDeploymentInput) SetAmznClientToken(v string) *StartBulkDeploymentInput { + s.AmznClientToken = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *StartBulkDeploymentInput) SetExecutionRoleArn(v string) *StartBulkDeploymentInput { + s.ExecutionRoleArn = &v + return s +} + +// SetInputFileUri sets the InputFileUri field's value. +func (s *StartBulkDeploymentInput) SetInputFileUri(v string) *StartBulkDeploymentInput { + s.InputFileUri = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *StartBulkDeploymentInput) SetTags(v map[string]*string) *StartBulkDeploymentInput { + s.Tags = v + return s +} + +type StartBulkDeploymentOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the bulk deployment. + BulkDeploymentArn *string `type:"string"` + + // The ID of the bulk deployment. + BulkDeploymentId *string `type:"string"` +} + +// String returns the string representation +func (s StartBulkDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartBulkDeploymentOutput) GoString() string { + return s.String() +} + +// SetBulkDeploymentArn sets the BulkDeploymentArn field's value. +func (s *StartBulkDeploymentOutput) SetBulkDeploymentArn(v string) *StartBulkDeploymentOutput { + s.BulkDeploymentArn = &v + return s +} + +// SetBulkDeploymentId sets the BulkDeploymentId field's value. +func (s *StartBulkDeploymentOutput) SetBulkDeploymentId(v string) *StartBulkDeploymentOutput { + s.BulkDeploymentId = &v + return s +} + +type StopBulkDeploymentInput struct { + _ struct{} `type:"structure"` + + // BulkDeploymentId is a required field + BulkDeploymentId *string `location:"uri" locationName:"BulkDeploymentId" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopBulkDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopBulkDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopBulkDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopBulkDeploymentInput"} + if s.BulkDeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("BulkDeploymentId")) + } + if s.BulkDeploymentId != nil && len(*s.BulkDeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BulkDeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBulkDeploymentId sets the BulkDeploymentId field's value. +func (s *StopBulkDeploymentInput) SetBulkDeploymentId(v string) *StopBulkDeploymentInput { + s.BulkDeploymentId = &v + return s +} + +type StopBulkDeploymentOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopBulkDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopBulkDeploymentOutput) GoString() string { + return s.String() +} + +// Information about a subscription. +type Subscription struct { + _ struct{} `type:"structure"` + + // A descriptive or arbitrary ID for the subscription. This value must be unique + // within the subscription definition version. Max length is 128 characters + // with pattern ''[a-zA-Z0-9:_-]+''. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The source of the subscription. Can be a thing ARN, a Lambda function ARN, + // a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'. + // + // Source is a required field + Source *string `type:"string" required:"true"` + + // The MQTT topic used to route the message. + // + // Subject is a required field + Subject *string `type:"string" required:"true"` + + // Where the message is sent to. Can be a thing ARN, a Lambda function ARN, + // a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'. + // + // Target is a required field + Target *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Subscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subscription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Subscription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Subscription"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.Subject == nil { + invalidParams.Add(request.NewErrParamRequired("Subject")) + } + if s.Target == nil { + invalidParams.Add(request.NewErrParamRequired("Target")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *Subscription) SetId(v string) *Subscription { + s.Id = &v + return s +} + +// SetSource sets the Source field's value. +func (s *Subscription) SetSource(v string) *Subscription { + s.Source = &v + return s +} + +// SetSubject sets the Subject field's value. +func (s *Subscription) SetSubject(v string) *Subscription { + s.Subject = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *Subscription) SetTarget(v string) *Subscription { + s.Target = &v + return s +} + +// Information about a subscription definition version. +type SubscriptionDefinitionVersion struct { + _ struct{} `type:"structure"` + + // A list of subscriptions. + Subscriptions []*Subscription `type:"list"` +} + +// String returns the string representation +func (s SubscriptionDefinitionVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubscriptionDefinitionVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SubscriptionDefinitionVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SubscriptionDefinitionVersion"} + if s.Subscriptions != nil { + for i, v := range s.Subscriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscriptions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSubscriptions sets the Subscriptions field's value. +func (s *SubscriptionDefinitionVersion) SetSubscriptions(v []*Subscription) *SubscriptionDefinitionVersion { + s.Subscriptions = v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` + + // The key-value pair for the resource tag. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// 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 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"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` + + // 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() +} + +// Information required to update a Greengrass core's connectivity. +type UpdateConnectivityInfoInput struct { + _ struct{} `type:"structure"` + + // A list of connectivity info. + ConnectivityInfo []*ConnectivityInfo `type:"list"` + + // ThingName is a required field + ThingName *string `location:"uri" locationName:"ThingName" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateConnectivityInfoInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConnectivityInfoInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConnectivityInfoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConnectivityInfoInput"} + if s.ThingName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingName")) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectivityInfo sets the ConnectivityInfo field's value. +func (s *UpdateConnectivityInfoInput) SetConnectivityInfo(v []*ConnectivityInfo) *UpdateConnectivityInfoInput { + s.ConnectivityInfo = v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *UpdateConnectivityInfoInput) SetThingName(v string) *UpdateConnectivityInfoInput { + s.ThingName = &v + return s +} + +type UpdateConnectivityInfoOutput struct { + _ struct{} `type:"structure"` + + // A message about the connectivity info update request. + Message *string `locationName:"message" type:"string"` + + // The new version of the connectivity info. + Version *string `type:"string"` +} + +// String returns the string representation +func (s UpdateConnectivityInfoOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConnectivityInfoOutput) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *UpdateConnectivityInfoOutput) SetMessage(v string) *UpdateConnectivityInfoOutput { + s.Message = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateConnectivityInfoOutput) SetVersion(v string) *UpdateConnectivityInfoOutput { + s.Version = &v + return s +} + +type UpdateConnectorDefinitionInput struct { + _ struct{} `type:"structure"` + + // ConnectorDefinitionId is a required field + ConnectorDefinitionId *string `location:"uri" locationName:"ConnectorDefinitionId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateConnectorDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConnectorDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConnectorDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConnectorDefinitionInput"} + if s.ConnectorDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectorDefinitionId")) + } + if s.ConnectorDefinitionId != nil && len(*s.ConnectorDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectorDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectorDefinitionId sets the ConnectorDefinitionId field's value. +func (s *UpdateConnectorDefinitionInput) SetConnectorDefinitionId(v string) *UpdateConnectorDefinitionInput { + s.ConnectorDefinitionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateConnectorDefinitionInput) SetName(v string) *UpdateConnectorDefinitionInput { + s.Name = &v + return s +} + +type UpdateConnectorDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateConnectorDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConnectorDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateCoreDefinitionInput struct { + _ struct{} `type:"structure"` + + // CoreDefinitionId is a required field + CoreDefinitionId *string `location:"uri" locationName:"CoreDefinitionId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateCoreDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCoreDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCoreDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCoreDefinitionInput"} + if s.CoreDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("CoreDefinitionId")) + } + if s.CoreDefinitionId != nil && len(*s.CoreDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CoreDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCoreDefinitionId sets the CoreDefinitionId field's value. +func (s *UpdateCoreDefinitionInput) SetCoreDefinitionId(v string) *UpdateCoreDefinitionInput { + s.CoreDefinitionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateCoreDefinitionInput) SetName(v string) *UpdateCoreDefinitionInput { + s.Name = &v + return s +} + +type UpdateCoreDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCoreDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCoreDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateDeviceDefinitionInput struct { + _ struct{} `type:"structure"` + + // DeviceDefinitionId is a required field + DeviceDefinitionId *string `location:"uri" locationName:"DeviceDefinitionId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateDeviceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeviceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceDefinitionInput"} + if s.DeviceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceDefinitionId")) + } + if s.DeviceDefinitionId != nil && len(*s.DeviceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceDefinitionId sets the DeviceDefinitionId field's value. +func (s *UpdateDeviceDefinitionInput) SetDeviceDefinitionId(v string) *UpdateDeviceDefinitionInput { + s.DeviceDefinitionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateDeviceDefinitionInput) SetName(v string) *UpdateDeviceDefinitionInput { + s.Name = &v + return s +} + +type UpdateDeviceDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateDeviceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateFunctionDefinitionInput struct { + _ struct{} `type:"structure"` + + // FunctionDefinitionId is a required field + FunctionDefinitionId *string `location:"uri" locationName:"FunctionDefinitionId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateFunctionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFunctionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFunctionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionDefinitionInput"} + if s.FunctionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionDefinitionId")) + } + if s.FunctionDefinitionId != nil && len(*s.FunctionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionDefinitionId sets the FunctionDefinitionId field's value. +func (s *UpdateFunctionDefinitionInput) SetFunctionDefinitionId(v string) *UpdateFunctionDefinitionInput { + s.FunctionDefinitionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateFunctionDefinitionInput) SetName(v string) *UpdateFunctionDefinitionInput { + s.Name = &v + return s +} + +type UpdateFunctionDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateFunctionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFunctionDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateGroupCertificateConfigurationInput struct { + _ struct{} `type:"structure"` + + // The amount of time remaining before the certificate expires, in milliseconds. + CertificateExpiryInMilliseconds *string `type:"string"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateGroupCertificateConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupCertificateConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGroupCertificateConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGroupCertificateConfigurationInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateExpiryInMilliseconds sets the CertificateExpiryInMilliseconds field's value. +func (s *UpdateGroupCertificateConfigurationInput) SetCertificateExpiryInMilliseconds(v string) *UpdateGroupCertificateConfigurationInput { + s.CertificateExpiryInMilliseconds = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *UpdateGroupCertificateConfigurationInput) SetGroupId(v string) *UpdateGroupCertificateConfigurationInput { + s.GroupId = &v + return s +} + +type UpdateGroupCertificateConfigurationOutput struct { + _ struct{} `type:"structure"` + + CertificateAuthorityExpiryInMilliseconds *string `type:"string"` + + CertificateExpiryInMilliseconds *string `type:"string"` + + GroupId *string `type:"string"` +} + +// String returns the string representation +func (s UpdateGroupCertificateConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupCertificateConfigurationOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorityExpiryInMilliseconds sets the CertificateAuthorityExpiryInMilliseconds field's value. +func (s *UpdateGroupCertificateConfigurationOutput) SetCertificateAuthorityExpiryInMilliseconds(v string) *UpdateGroupCertificateConfigurationOutput { + s.CertificateAuthorityExpiryInMilliseconds = &v + return s +} + +// SetCertificateExpiryInMilliseconds sets the CertificateExpiryInMilliseconds field's value. +func (s *UpdateGroupCertificateConfigurationOutput) SetCertificateExpiryInMilliseconds(v string) *UpdateGroupCertificateConfigurationOutput { + s.CertificateExpiryInMilliseconds = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *UpdateGroupCertificateConfigurationOutput) SetGroupId(v string) *UpdateGroupCertificateConfigurationOutput { + s.GroupId = &v + return s +} + +type UpdateGroupInput struct { + _ struct{} `type:"structure"` + + // GroupId is a required field + GroupId *string `location:"uri" locationName:"GroupId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.GroupId != nil && len(*s.GroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *UpdateGroupInput) SetGroupId(v string) *UpdateGroupInput { + s.GroupId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateGroupInput) SetName(v string) *UpdateGroupInput { + s.Name = &v + return s +} + +type UpdateGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupOutput) GoString() string { + return s.String() +} + +type UpdateLoggerDefinitionInput struct { + _ struct{} `type:"structure"` + + // LoggerDefinitionId is a required field + LoggerDefinitionId *string `location:"uri" locationName:"LoggerDefinitionId" type:"string" required:"true"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateLoggerDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLoggerDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLoggerDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLoggerDefinitionInput"} + if s.LoggerDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("LoggerDefinitionId")) + } + if s.LoggerDefinitionId != nil && len(*s.LoggerDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoggerDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggerDefinitionId sets the LoggerDefinitionId field's value. +func (s *UpdateLoggerDefinitionInput) SetLoggerDefinitionId(v string) *UpdateLoggerDefinitionInput { + s.LoggerDefinitionId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateLoggerDefinitionInput) SetName(v string) *UpdateLoggerDefinitionInput { + s.Name = &v + return s +} + +type UpdateLoggerDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateLoggerDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLoggerDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateResourceDefinitionInput struct { + _ struct{} `type:"structure"` + + Name *string `type:"string"` + + // ResourceDefinitionId is a required field + ResourceDefinitionId *string `location:"uri" locationName:"ResourceDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResourceDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourceDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResourceDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResourceDefinitionInput"} + if s.ResourceDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceDefinitionId")) + } + if s.ResourceDefinitionId != nil && len(*s.ResourceDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateResourceDefinitionInput) SetName(v string) *UpdateResourceDefinitionInput { + s.Name = &v + return s +} + +// SetResourceDefinitionId sets the ResourceDefinitionId field's value. +func (s *UpdateResourceDefinitionInput) SetResourceDefinitionId(v string) *UpdateResourceDefinitionInput { + s.ResourceDefinitionId = &v + return s +} + +type UpdateResourceDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateResourceDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourceDefinitionOutput) GoString() string { + return s.String() +} + +type UpdateSubscriptionDefinitionInput struct { + _ struct{} `type:"structure"` + + Name *string `type:"string"` + + // SubscriptionDefinitionId is a required field + SubscriptionDefinitionId *string `location:"uri" locationName:"SubscriptionDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSubscriptionDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubscriptionDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSubscriptionDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSubscriptionDefinitionInput"} + if s.SubscriptionDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionDefinitionId")) + } + if s.SubscriptionDefinitionId != nil && len(*s.SubscriptionDefinitionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubscriptionDefinitionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateSubscriptionDefinitionInput) SetName(v string) *UpdateSubscriptionDefinitionInput { + s.Name = &v + return s +} + +// SetSubscriptionDefinitionId sets the SubscriptionDefinitionId field's value. +func (s *UpdateSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string) *UpdateSubscriptionDefinitionInput { + s.SubscriptionDefinitionId = &v + return s +} + +type UpdateSubscriptionDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateSubscriptionDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubscriptionDefinitionOutput) GoString() string { + return s.String() +} + +// Information about a version. +type VersionInformation struct { + _ struct{} `type:"structure"` + + // The ARN of the version. + Arn *string `type:"string"` + + // The time, in milliseconds since the epoch, when the version was created. + CreationTimestamp *string `type:"string"` + + // The ID of the parent definition that the version is associated with. + Id *string `type:"string"` + + // The ID of the version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s VersionInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VersionInformation) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VersionInformation) SetArn(v string) *VersionInformation { + s.Arn = &v + return s +} + +// SetCreationTimestamp sets the CreationTimestamp field's value. +func (s *VersionInformation) SetCreationTimestamp(v string) *VersionInformation { + s.CreationTimestamp = &v + return s +} + +// SetId sets the Id field's value. +func (s *VersionInformation) SetId(v string) *VersionInformation { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *VersionInformation) SetVersion(v string) *VersionInformation { + s.Version = &v + return s +} + +// The current status of the bulk deployment. +const ( + // BulkDeploymentStatusInitializing is a BulkDeploymentStatus enum value + BulkDeploymentStatusInitializing = "Initializing" + + // BulkDeploymentStatusRunning is a BulkDeploymentStatus enum value + BulkDeploymentStatusRunning = "Running" + + // BulkDeploymentStatusCompleted is a BulkDeploymentStatus enum value + BulkDeploymentStatusCompleted = "Completed" + + // BulkDeploymentStatusStopping is a BulkDeploymentStatus enum value + BulkDeploymentStatusStopping = "Stopping" + + // BulkDeploymentStatusStopped is a BulkDeploymentStatus enum value + BulkDeploymentStatusStopped = "Stopped" + + // BulkDeploymentStatusFailed is a BulkDeploymentStatus enum value + BulkDeploymentStatusFailed = "Failed" +) + +// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' +// and ''Redeployment'' are valid. +const ( + // DeploymentTypeNewDeployment is a DeploymentType enum value + DeploymentTypeNewDeployment = "NewDeployment" + + // DeploymentTypeRedeployment is a DeploymentType enum value + DeploymentTypeRedeployment = "Redeployment" + + // DeploymentTypeResetDeployment is a DeploymentType enum value + DeploymentTypeResetDeployment = "ResetDeployment" + + // DeploymentTypeForceResetDeployment is a DeploymentType enum value + DeploymentTypeForceResetDeployment = "ForceResetDeployment" +) + +const ( + // EncodingTypeBinary is a EncodingType enum value + EncodingTypeBinary = "binary" + + // EncodingTypeJson is a EncodingType enum value + EncodingTypeJson = "json" +) + +// Specifies whether the Lambda function runs in a Greengrass container (default) +// or without containerization. Unless your scenario requires that you run without +// containerization, we recommend that you run in a Greengrass container. Omit +// this value to run the Lambda function with the default containerization for +// the group. +const ( + // FunctionIsolationModeGreengrassContainer is a FunctionIsolationMode enum value + FunctionIsolationModeGreengrassContainer = "GreengrassContainer" + + // FunctionIsolationModeNoContainer is a FunctionIsolationMode enum value + FunctionIsolationModeNoContainer = "NoContainer" +) + +const ( + // LoggerComponentGreengrassSystem is a LoggerComponent enum value + LoggerComponentGreengrassSystem = "GreengrassSystem" + + // LoggerComponentLambda is a LoggerComponent enum value + LoggerComponentLambda = "Lambda" +) + +const ( + // LoggerLevelDebug is a LoggerLevel enum value + LoggerLevelDebug = "DEBUG" + + // LoggerLevelInfo is a LoggerLevel enum value + LoggerLevelInfo = "INFO" + + // LoggerLevelWarn is a LoggerLevel enum value + LoggerLevelWarn = "WARN" + + // LoggerLevelError is a LoggerLevel enum value + LoggerLevelError = "ERROR" + + // LoggerLevelFatal is a LoggerLevel enum value + LoggerLevelFatal = "FATAL" +) + +const ( + // LoggerTypeFileSystem is a LoggerType enum value + LoggerTypeFileSystem = "FileSystem" + + // LoggerTypeAwscloudWatch is a LoggerType enum value + LoggerTypeAwscloudWatch = "AWSCloudWatch" +) + +// The type of permission a function has to access a resource. +const ( + // PermissionRo is a Permission enum value + PermissionRo = "ro" + + // PermissionRw is a Permission enum value + PermissionRw = "rw" +) + +// The piece of software on the Greengrass core that will be updated. +const ( + // SoftwareToUpdateCore is a SoftwareToUpdate enum value + SoftwareToUpdateCore = "core" + + // SoftwareToUpdateOtaAgent is a SoftwareToUpdate enum value + SoftwareToUpdateOtaAgent = "ota_agent" +) + +// The minimum level of log statements that should be logged by the OTA Agent +// during an update. +const ( + // UpdateAgentLogLevelNone is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelNone = "NONE" + + // UpdateAgentLogLevelTrace is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelTrace = "TRACE" + + // UpdateAgentLogLevelDebug is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelDebug = "DEBUG" + + // UpdateAgentLogLevelVerbose is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelVerbose = "VERBOSE" + + // UpdateAgentLogLevelInfo is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelInfo = "INFO" + + // UpdateAgentLogLevelWarn is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelWarn = "WARN" + + // UpdateAgentLogLevelError is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelError = "ERROR" + + // UpdateAgentLogLevelFatal is a UpdateAgentLogLevel enum value + UpdateAgentLogLevelFatal = "FATAL" +) + +// The architecture of the cores which are the targets of an update. +const ( + // UpdateTargetsArchitectureArmv6l is a UpdateTargetsArchitecture enum value + UpdateTargetsArchitectureArmv6l = "armv6l" + + // UpdateTargetsArchitectureArmv7l is a UpdateTargetsArchitecture enum value + UpdateTargetsArchitectureArmv7l = "armv7l" + + // UpdateTargetsArchitectureX8664 is a UpdateTargetsArchitecture enum value + UpdateTargetsArchitectureX8664 = "x86_64" + + // UpdateTargetsArchitectureAarch64 is a UpdateTargetsArchitecture enum value + UpdateTargetsArchitectureAarch64 = "aarch64" + + // UpdateTargetsArchitectureOpenwrt is a UpdateTargetsArchitecture enum value + UpdateTargetsArchitectureOpenwrt = "openwrt" +) + +// The operating system of the cores which are the targets of an update. +const ( + // UpdateTargetsOperatingSystemUbuntu is a UpdateTargetsOperatingSystem enum value + UpdateTargetsOperatingSystemUbuntu = "ubuntu" + + // UpdateTargetsOperatingSystemRaspbian is a UpdateTargetsOperatingSystem enum value + UpdateTargetsOperatingSystemRaspbian = "raspbian" + + // UpdateTargetsOperatingSystemAmazonLinux is a UpdateTargetsOperatingSystem enum value + UpdateTargetsOperatingSystemAmazonLinux = "amazon_linux" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/greengrass/doc.go b/vendor/github.com/aws/aws-sdk-go/service/greengrass/doc.go new file mode 100644 index 00000000000..c4b86ff1f29 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/greengrass/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package greengrass provides the client and types for making API +// requests to AWS Greengrass. +// +// AWS IoT Greengrass seamlessly extends AWS onto physical devices so they can +// act locally on the data they generate, while still using the cloud for management, +// analytics, and durable storage. AWS IoT Greengrass ensures your devices can +// respond quickly to local events and operate with intermittent connectivity. +// AWS IoT Greengrass minimizes the cost of transmitting data to the cloud by +// allowing you to author AWS Lambda functions that execute locally. +// +// See https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07 for more information on this service. +// +// See greengrass package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/greengrass/ +// +// Using the Client +// +// To contact AWS Greengrass 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 Greengrass client Greengrass for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/greengrass/#New +package greengrass diff --git a/vendor/github.com/aws/aws-sdk-go/service/greengrass/errors.go b/vendor/github.com/aws/aws-sdk-go/service/greengrass/errors.go new file mode 100644 index 00000000000..9da6c5076fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/greengrass/errors.go @@ -0,0 +1,18 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package greengrass + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // General error information. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // General error information. + ErrCodeInternalServerErrorException = "InternalServerErrorException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/greengrass/service.go b/vendor/github.com/aws/aws-sdk-go/service/greengrass/service.go new file mode 100644 index 00000000000..15a4b779fc0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/greengrass/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package greengrass + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Greengrass provides the API operation methods for making requests to +// AWS Greengrass. See this package's package overview docs +// for details on the service. +// +// Greengrass methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Greengrass 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 = "greengrass" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Greengrass" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Greengrass client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Greengrass client from just a session. +// svc := greengrass.New(mySession) +// +// // Create a Greengrass client with additional configuration +// svc := greengrass.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Greengrass { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "greengrass" + } + 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) *Greengrass { + svc := &Greengrass{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2017-06-07", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Greengrass operation and runs any +// custom request initialization. +func (c *Greengrass) 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/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index a7d9696869b..0760c6ca003 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 @@ -2387,10 +2387,12 @@ func (c *GuardDuty) ListDetectorsPagesWithContext(ctx aws.Context, input *ListDe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDetectorsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDetectorsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2525,10 +2527,12 @@ func (c *GuardDuty) ListFiltersPagesWithContext(ctx aws.Context, input *ListFilt }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFiltersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFiltersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2663,10 +2667,12 @@ func (c *GuardDuty) ListFindingsPagesWithContext(ctx aws.Context, input *ListFin }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2801,10 +2807,12 @@ func (c *GuardDuty) ListIPSetsPagesWithContext(ctx aws.Context, input *ListIPSet }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListIPSetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListIPSetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2940,10 +2948,12 @@ func (c *GuardDuty) ListInvitationsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3079,10 +3089,12 @@ func (c *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMemb }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3303,10 +3315,12 @@ func (c *GuardDuty) ListThreatIntelSetsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListThreatIntelSetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListThreatIntelSetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 64f25432642..353421f0817 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 @@ -5583,10 +5583,12 @@ func (c *IAM) GetAccountAuthorizationDetailsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6178,10 +6180,12 @@ func (c *IAM) GetGroupPagesWithContext(ctx aws.Context, input *GetGroupInput, fn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetGroupOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetGroupOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7973,10 +7977,12 @@ func (c *IAM) ListAccessKeysPagesWithContext(ctx aws.Context, input *ListAccessK }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8112,10 +8118,12 @@ func (c *IAM) ListAccountAliasesPagesWithContext(ctx aws.Context, input *ListAcc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8267,10 +8275,12 @@ func (c *IAM) ListAttachedGroupPoliciesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8422,10 +8432,12 @@ func (c *IAM) ListAttachedRolePoliciesPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8577,10 +8589,12 @@ func (c *IAM) ListAttachedUserPoliciesPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8729,10 +8743,12 @@ func (c *IAM) ListEntitiesForPolicyPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8880,10 +8896,12 @@ func (c *IAM) ListGroupPoliciesPagesWithContext(ctx aws.Context, input *ListGrou }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9018,10 +9036,12 @@ func (c *IAM) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9160,10 +9180,12 @@ func (c *IAM) ListGroupsForUserPagesWithContext(ctx aws.Context, input *ListGrou }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9300,10 +9322,12 @@ func (c *IAM) ListInstanceProfilesPagesWithContext(ctx aws.Context, input *ListI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9444,10 +9468,12 @@ func (c *IAM) ListInstanceProfilesForRolePagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9589,10 +9615,12 @@ func (c *IAM) ListMFADevicesPagesWithContext(ctx aws.Context, input *ListMFADevi }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9818,10 +9846,12 @@ func (c *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10085,10 +10115,12 @@ func (c *IAM) ListPolicyVersionsPagesWithContext(ctx aws.Context, input *ListPol }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10235,10 +10267,12 @@ func (c *IAM) ListRolePoliciesPagesWithContext(ctx aws.Context, input *ListRoleP }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10462,10 +10496,12 @@ func (c *IAM) ListRolesPagesWithContext(ctx aws.Context, input *ListRolesInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRolesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRolesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10690,10 +10726,12 @@ func (c *IAM) ListSSHPublicKeysPagesWithContext(ctx aws.Context, input *ListSSHP }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -10834,10 +10872,12 @@ func (c *IAM) ListServerCertificatesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11073,10 +11113,12 @@ func (c *IAM) ListSigningCertificatesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11222,10 +11264,12 @@ func (c *IAM) ListUserPoliciesPagesWithContext(ctx aws.Context, input *ListUserP }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11449,10 +11493,12 @@ func (c *IAM) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -11584,10 +11630,12 @@ func (c *IAM) ListVirtualMFADevicesPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -12965,10 +13013,12 @@ func (c *IAM) SimulateCustomPolicyPagesWithContext(ctx aws.Context, input *Simul }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13135,10 +13185,12 @@ func (c *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *Si }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { + break + } } + return p.Err() } 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 285bd3b6b8b..19ddc93f877 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 @@ -1720,10 +1720,12 @@ func (c *Inspector) GetExclusionsPreviewPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1958,10 +1960,12 @@ func (c *Inspector) ListAssessmentRunAgentsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentRunAgentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAssessmentRunAgentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2105,10 +2109,12 @@ func (c *Inspector) ListAssessmentRunsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentRunsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAssessmentRunsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2249,10 +2255,12 @@ func (c *Inspector) ListAssessmentTargetsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentTargetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAssessmentTargetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2396,10 +2404,12 @@ func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2544,10 +2554,12 @@ func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2690,10 +2702,12 @@ func (c *Inspector) ListExclusionsPagesWithContext(ctx aws.Context, input *ListE }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2837,10 +2851,12 @@ func (c *Inspector) ListFindingsPagesWithContext(ctx aws.Context, input *ListFin }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFindingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2979,10 +2995,12 @@ func (c *Inspector) ListRulesPackagesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRulesPackagesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRulesPackagesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3220,10 +3238,12 @@ func (c *Inspector) PreviewAgentsPagesWithContext(ctx aws.Context, input *Previe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*PreviewAgentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*PreviewAgentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 55fb8236b2d..2192689007d 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 @@ -1818,10 +1818,12 @@ func (c *IoTAnalytics) ListChannelsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1965,10 +1967,12 @@ func (c *IoTAnalytics) ListDatasetContentsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetContentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetContentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2109,10 +2113,12 @@ func (c *IoTAnalytics) ListDatasetsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2253,10 +2259,12 @@ func (c *IoTAnalytics) ListDatastoresPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatastoresOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatastoresOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2397,10 +2405,12 @@ func (c *IoTAnalytics) ListPipelinesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 f95dd4a89da..418fe50a087 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 @@ -896,10 +896,12 @@ func (c *Kafka) ListClusterOperationsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClusterOperationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListClusterOperationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1040,10 +1042,12 @@ func (c *Kafka) ListClustersPagesWithContext(ctx aws.Context, input *ListCluster }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1190,10 +1194,12 @@ func (c *Kafka) ListConfigurationRevisionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListConfigurationRevisionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListConfigurationRevisionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1337,10 +1343,12 @@ func (c *Kafka) ListConfigurationsPagesWithContext(ctx aws.Context, input *ListC }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1481,10 +1489,12 @@ func (c *Kafka) ListNodesPagesWithContext(ctx aws.Context, input *ListNodesInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNodesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNodesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b282cf645b7..a4a81b872f1 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 @@ -791,10 +791,12 @@ func (c *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeStreamOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeStreamOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1825,10 +1827,12 @@ func (c *Kinesis) ListStreamConsumersPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamConsumersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStreamConsumersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1976,10 +1980,12 @@ func (c *Kinesis) ListStreamsPagesWithContext(ctx aws.Context, input *ListStream }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 7f7f8b44d89..595a2fcb5ae 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 @@ -548,10 +548,12 @@ func (c *KinesisVideo) ListStreamsPagesWithContext(ctx aws.Context, input *ListS }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3978e852ff8..d1375b22606 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 @@ -3404,10 +3404,12 @@ func (c *KMS) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3567,10 +3569,12 @@ func (c *KMS) ListGrantsPagesWithContext(ctx aws.Context, input *ListGrantsInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGrantsResponse), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGrantsResponse), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3726,10 +3730,12 @@ func (c *KMS) ListKeyPoliciesPagesWithContext(ctx aws.Context, input *ListKeyPol }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListKeyPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListKeyPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3871,10 +3877,12 @@ func (c *KMS) ListKeysPagesWithContext(ctx aws.Context, input *ListKeysInput, fn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListKeysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListKeysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 0a335997810..b457320c659 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 @@ -581,10 +581,12 @@ func (c *LakeFormation) GetEffectivePermissionsForPathPagesWithContext(ctx aws.C }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetEffectivePermissionsForPathOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetEffectivePermissionsForPathOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -819,10 +821,12 @@ func (c *LakeFormation) ListPermissionsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPermissionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPermissionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -960,10 +964,12 @@ func (c *LakeFormation) ListResourcesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4bc2b216989..c5c91217388 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 @@ -2276,10 +2276,12 @@ func (c *Lambda) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliases }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2424,10 +2426,12 @@ func (c *Lambda) ListEventSourceMappingsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEventSourceMappingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEventSourceMappingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2572,10 +2576,12 @@ func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunct }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFunctionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFunctionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2722,10 +2728,12 @@ func (c *Lambda) ListLayerVersionsPagesWithContext(ctx aws.Context, input *ListL }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLayerVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLayerVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2868,10 +2876,12 @@ func (c *Lambda) ListLayersPagesWithContext(ctx aws.Context, input *ListLayersIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLayersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLayersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3108,10 +3118,12 @@ func (c *Lambda) ListVersionsByFunctionPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVersionsByFunctionOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVersionsByFunctionOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3c3ccc5e9ca..f99d0efabb8 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 @@ -1661,10 +1661,12 @@ func (c *LexModelBuildingService) GetBotAliasesPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotAliasesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBotAliasesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1900,10 +1902,12 @@ func (c *LexModelBuildingService) GetBotChannelAssociationsPagesWithContext(ctx }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotChannelAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBotChannelAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2056,10 +2060,12 @@ func (c *LexModelBuildingService) GetBotVersionsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBotVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2211,10 +2217,12 @@ func (c *LexModelBuildingService) GetBotsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBotsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBotsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2447,10 +2455,12 @@ func (c *LexModelBuildingService) GetBuiltinIntentsPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBuiltinIntentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBuiltinIntentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2594,10 +2604,12 @@ func (c *LexModelBuildingService) GetBuiltinSlotTypesPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetBuiltinSlotTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetBuiltinSlotTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3023,10 +3035,12 @@ func (c *LexModelBuildingService) GetIntentVersionsPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetIntentVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetIntentVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3177,10 +3191,12 @@ func (c *LexModelBuildingService) GetIntentsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetIntentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetIntentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3426,10 +3442,12 @@ func (c *LexModelBuildingService) GetSlotTypeVersionsPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSlotTypeVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetSlotTypeVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3580,10 +3598,12 @@ func (c *LexModelBuildingService) GetSlotTypesPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSlotTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetSlotTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 1015a9f809c..a3a890dcb22 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 @@ -500,10 +500,12 @@ func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListM }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -646,10 +648,12 @@ func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3Re }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 a0bd14cbfd8..bea6e734bed 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 @@ -1185,10 +1185,12 @@ func (c *ManagedBlockchain) ListInvitationsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1334,10 +1336,12 @@ func (c *ManagedBlockchain) ListMembersPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1484,10 +1488,12 @@ func (c *ManagedBlockchain) ListNetworksPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNetworksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNetworksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1633,10 +1639,12 @@ func (c *ManagedBlockchain) ListNodesPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNodesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNodesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1783,10 +1791,12 @@ func (c *ManagedBlockchain) ListProposalVotesPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProposalVotesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProposalVotesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1936,10 +1946,12 @@ func (c *ManagedBlockchain) ListProposalsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProposalsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProposalsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 53ab3dfb0e7..552798277ef 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 @@ -701,10 +701,12 @@ func (c *MediaConnect) ListEntitlementsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEntitlementsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEntitlementsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -854,10 +856,12 @@ func (c *MediaConnect) ListFlowsPagesWithContext(ctx aws.Context, input *ListFlo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFlowsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFlowsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 ca6b366b246..ab8eadf8ac2 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 @@ -954,10 +954,12 @@ func (c *MediaConvert) DescribeEndpointsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1542,10 +1544,12 @@ func (c *MediaConvert) ListJobTemplatesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobTemplatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobTemplatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1689,10 +1693,12 @@ func (c *MediaConvert) ListJobsPagesWithContext(ctx aws.Context, input *ListJobs }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1835,10 +1841,12 @@ func (c *MediaConvert) ListPresetsPagesWithContext(ctx aws.Context, input *ListP }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1981,10 +1989,12 @@ func (c *MediaConvert) ListQueuesPagesWithContext(ctx aws.Context, input *ListQu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListQueuesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListQueuesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3f18a7e0187..84f7d8662f6 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 @@ -1590,10 +1590,12 @@ func (c *MediaLive) DescribeSchedulePagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeScheduleOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeScheduleOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1734,10 +1736,12 @@ func (c *MediaLive) ListChannelsPagesWithContext(ctx aws.Context, input *ListCha }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1878,10 +1882,12 @@ func (c *MediaLive) ListInputSecurityGroupsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInputSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInputSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2022,10 +2028,12 @@ func (c *MediaLive) ListInputsPagesWithContext(ctx aws.Context, input *ListInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInputsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInputsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2166,10 +2174,12 @@ func (c *MediaLive) ListOfferingsPagesWithContext(ctx aws.Context, input *ListOf }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2310,10 +2320,12 @@ func (c *MediaLive) ListReservationsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListReservationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListReservationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 30f80e20c54..5007aceb1fe 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 @@ -855,10 +855,12 @@ func (c *MediaPackage) ListChannelsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -999,10 +1001,12 @@ func (c *MediaPackage) ListHarvestJobsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHarvestJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHarvestJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1143,10 +1147,12 @@ func (c *MediaPackage) ListOriginEndpointsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOriginEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOriginEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 75bb7975c89..d378c5f7561 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 @@ -963,10 +963,12 @@ func (c *MediaStore) ListContainersPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListContainersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListContainersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3f4784369c9..773f341b62e 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 @@ -407,10 +407,12 @@ func (c *MediaStoreData) ListItemsPagesWithContext(ctx aws.Context, input *ListI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListItemsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListItemsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index 39af2f2ae5d..4afd98929b6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -2569,10 +2569,12 @@ func (c *Neptune) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2704,10 +2706,12 @@ func (c *Neptune) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *De }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2841,10 +2845,12 @@ func (c *Neptune) DescribeDBParameterGroupsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2976,10 +2982,12 @@ func (c *Neptune) DescribeDBParametersPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3114,10 +3122,12 @@ func (c *Neptune) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3320,10 +3330,12 @@ func (c *Neptune) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3534,10 +3546,12 @@ func (c *Neptune) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3668,10 +3682,12 @@ func (c *Neptune) DescribeEventsPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3798,10 +3814,12 @@ func (c *Neptune) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 183f356567b..b16906833d2 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 @@ -2380,10 +2380,12 @@ func (c *OpsWorks) DescribeEcsClustersPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEcsClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEcsClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 30cc858469b..10f02dbeabf 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 @@ -6543,10 +6543,12 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationPagesWithContext(ctx }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAWSServiceAccessForOrganizationOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAWSServiceAccessForOrganizationOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6771,10 +6773,12 @@ func (c *Organizations) ListAccountsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7004,10 +7008,12 @@ func (c *Organizations) ListAccountsForParentPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAccountsForParentOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAccountsForParentOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7235,10 +7241,12 @@ func (c *Organizations) ListChildrenPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListChildrenOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListChildrenOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7465,10 +7473,12 @@ func (c *Organizations) ListCreateAccountStatusPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCreateAccountStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCreateAccountStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7696,10 +7706,12 @@ func (c *Organizations) ListHandshakesForAccountPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHandshakesForAccountOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHandshakesForAccountOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7933,10 +7945,12 @@ func (c *Organizations) ListHandshakesForOrganizationPagesWithContext(ctx aws.Co }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHandshakesForOrganizationOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHandshakesForOrganizationOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8162,10 +8176,12 @@ func (c *Organizations) ListOrganizationalUnitsForParentPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOrganizationalUnitsForParentOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOrganizationalUnitsForParentOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8396,10 +8412,12 @@ func (c *Organizations) ListParentsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListParentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListParentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8622,10 +8640,12 @@ func (c *Organizations) ListPoliciesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8853,10 +8873,12 @@ func (c *Organizations) ListPoliciesForTargetPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPoliciesForTargetOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPoliciesForTargetOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9085,10 +9107,12 @@ func (c *Organizations) ListRootsPagesWithContext(ctx aws.Context, input *ListRo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRootsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRootsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9311,10 +9335,12 @@ func (c *Organizations) ListTagsForResourcePagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -9541,10 +9567,12 @@ func (c *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 1c330645b39..06ea030a9df 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 @@ -13,6 +13,99 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opCreateBatchInferenceJob = "CreateBatchInferenceJob" + +// CreateBatchInferenceJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateBatchInferenceJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBatchInferenceJob for more information on using the CreateBatchInferenceJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBatchInferenceJobRequest method. +// req, resp := client.CreateBatchInferenceJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/CreateBatchInferenceJob +func (c *Personalize) CreateBatchInferenceJobRequest(input *CreateBatchInferenceJobInput) (req *request.Request, output *CreateBatchInferenceJobOutput) { + op := &request.Operation{ + Name: opCreateBatchInferenceJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateBatchInferenceJobInput{} + } + + output = &CreateBatchInferenceJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBatchInferenceJob API operation for Amazon Personalize. +// +// Creates a batch inference job. The operation can handle up to 50 million +// records and the input file must be in JSON format. For more information, +// see recommendations-batch. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Personalize's +// API operation CreateBatchInferenceJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// Provide a valid value for the field or parameter. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The specified resource already exists. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The limit on the number of requests per second has been exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Could not find the specified resource. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The specified resource is in use. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/CreateBatchInferenceJob +func (c *Personalize) CreateBatchInferenceJob(input *CreateBatchInferenceJobInput) (*CreateBatchInferenceJobOutput, error) { + req, out := c.CreateBatchInferenceJobRequest(input) + return out, req.Send() +} + +// CreateBatchInferenceJobWithContext is the same as CreateBatchInferenceJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBatchInferenceJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Personalize) CreateBatchInferenceJobWithContext(ctx aws.Context, input *CreateBatchInferenceJobInput, opts ...request.Option) (*CreateBatchInferenceJobOutput, error) { + req, out := c.CreateBatchInferenceJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateCampaign = "CreateCampaign" // CreateCampaignRequest generates a "aws/request.Request" representing the @@ -1596,6 +1689,90 @@ func (c *Personalize) DescribeAlgorithmWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribeBatchInferenceJob = "DescribeBatchInferenceJob" + +// DescribeBatchInferenceJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBatchInferenceJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBatchInferenceJob for more information on using the DescribeBatchInferenceJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBatchInferenceJobRequest method. +// req, resp := client.DescribeBatchInferenceJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/DescribeBatchInferenceJob +func (c *Personalize) DescribeBatchInferenceJobRequest(input *DescribeBatchInferenceJobInput) (req *request.Request, output *DescribeBatchInferenceJobOutput) { + op := &request.Operation{ + Name: opDescribeBatchInferenceJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBatchInferenceJobInput{} + } + + output = &DescribeBatchInferenceJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBatchInferenceJob API operation for Amazon Personalize. +// +// Gets the properties of a batch inference job including name, Amazon Resource +// Name (ARN), status, input and output configurations, and the ARN of the solution +// version used to generate the recommendations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Personalize's +// API operation DescribeBatchInferenceJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// Provide a valid value for the field or parameter. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Could not find the specified resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/DescribeBatchInferenceJob +func (c *Personalize) DescribeBatchInferenceJob(input *DescribeBatchInferenceJobInput) (*DescribeBatchInferenceJobOutput, error) { + req, out := c.DescribeBatchInferenceJobRequest(input) + return out, req.Send() +} + +// DescribeBatchInferenceJobWithContext is the same as DescribeBatchInferenceJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBatchInferenceJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Personalize) DescribeBatchInferenceJobWithContext(ctx aws.Context, input *DescribeBatchInferenceJobInput, opts ...request.Option) (*DescribeBatchInferenceJobOutput, error) { + req, out := c.DescribeBatchInferenceJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeCampaign = "DescribeCampaign" // DescribeCampaignRequest generates a "aws/request.Request" representing the @@ -2532,6 +2709,147 @@ func (c *Personalize) GetSolutionMetricsWithContext(ctx aws.Context, input *GetS return out, req.Send() } +const opListBatchInferenceJobs = "ListBatchInferenceJobs" + +// ListBatchInferenceJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListBatchInferenceJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBatchInferenceJobs for more information on using the ListBatchInferenceJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBatchInferenceJobsRequest method. +// req, resp := client.ListBatchInferenceJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/ListBatchInferenceJobs +func (c *Personalize) ListBatchInferenceJobsRequest(input *ListBatchInferenceJobsInput) (req *request.Request, output *ListBatchInferenceJobsOutput) { + op := &request.Operation{ + Name: opListBatchInferenceJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBatchInferenceJobsInput{} + } + + output = &ListBatchInferenceJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBatchInferenceJobs API operation for Amazon Personalize. +// +// Gets a list of the batch inference jobs that have been performed off of a +// solution version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Personalize's +// API operation ListBatchInferenceJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// Provide a valid value for the field or parameter. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/ListBatchInferenceJobs +func (c *Personalize) ListBatchInferenceJobs(input *ListBatchInferenceJobsInput) (*ListBatchInferenceJobsOutput, error) { + req, out := c.ListBatchInferenceJobsRequest(input) + return out, req.Send() +} + +// ListBatchInferenceJobsWithContext is the same as ListBatchInferenceJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListBatchInferenceJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Personalize) ListBatchInferenceJobsWithContext(ctx aws.Context, input *ListBatchInferenceJobsInput, opts ...request.Option) (*ListBatchInferenceJobsOutput, error) { + req, out := c.ListBatchInferenceJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBatchInferenceJobsPages iterates over the pages of a ListBatchInferenceJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBatchInferenceJobs 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 ListBatchInferenceJobs operation. +// pageNum := 0 +// err := client.ListBatchInferenceJobsPages(params, +// func(page *personalize.ListBatchInferenceJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Personalize) ListBatchInferenceJobsPages(input *ListBatchInferenceJobsInput, fn func(*ListBatchInferenceJobsOutput, bool) bool) error { + return c.ListBatchInferenceJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBatchInferenceJobsPagesWithContext same as ListBatchInferenceJobsPages 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 *Personalize) ListBatchInferenceJobsPagesWithContext(ctx aws.Context, input *ListBatchInferenceJobsInput, fn func(*ListBatchInferenceJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBatchInferenceJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBatchInferenceJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListBatchInferenceJobsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListCampaigns = "ListCampaigns" // ListCampaignsRequest generates a "aws/request.Request" representing the @@ -2666,10 +2984,12 @@ func (c *Personalize) ListCampaignsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCampaignsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCampaignsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2803,10 +3123,12 @@ func (c *Personalize) ListDatasetGroupsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2946,10 +3268,12 @@ func (c *Personalize) ListDatasetImportJobsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetImportJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetImportJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3086,10 +3410,12 @@ func (c *Personalize) ListDatasetsPagesWithContext(ctx aws.Context, input *ListD }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDatasetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3226,10 +3552,12 @@ func (c *Personalize) ListEventTrackersPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEventTrackersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEventTrackersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3362,10 +3690,12 @@ func (c *Personalize) ListRecipesPagesWithContext(ctx aws.Context, input *ListRe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRecipesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRecipesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3499,10 +3829,12 @@ func (c *Personalize) ListSchemasPagesWithContext(ctx aws.Context, input *ListSc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSchemasOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSchemasOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3643,10 +3975,12 @@ func (c *Personalize) ListSolutionVersionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSolutionVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSolutionVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3784,10 +4118,12 @@ func (c *Personalize) ListSolutionsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSolutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSolutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4068,23 +4404,320 @@ func (s *AutoMLConfig) SetRecipeList(v []*string) *AutoMLConfig { type AutoMLResult struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the best recipe. - BestRecipeArn *string `locationName:"bestRecipeArn" type:"string"` + // The Amazon Resource Name (ARN) of the best recipe. + BestRecipeArn *string `locationName:"bestRecipeArn" type:"string"` +} + +// String returns the string representation +func (s AutoMLResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoMLResult) GoString() string { + return s.String() +} + +// SetBestRecipeArn sets the BestRecipeArn field's value. +func (s *AutoMLResult) SetBestRecipeArn(v string) *AutoMLResult { + s.BestRecipeArn = &v + return s +} + +// Contains information on a batch inference job. +type BatchInferenceJob struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the batch inference job. + BatchInferenceJobArn *string `locationName:"batchInferenceJobArn" type:"string"` + + // The time at which the batch inference job was created. + CreationDateTime *time.Time `locationName:"creationDateTime" type:"timestamp"` + + // If the batch inference job failed, the reason for the failure. + FailureReason *string `locationName:"failureReason" type:"string"` + + // The Amazon S3 path that leads to the input data used to generate the batch + // inference job. + JobInput *BatchInferenceJobInput `locationName:"jobInput" type:"structure"` + + // The name of the batch inference job. + JobName *string `locationName:"jobName" min:"1" type:"string"` + + // The Amazon S3 bucket that contains the output data generated by the batch + // inference job. + JobOutput *BatchInferenceJobOutput `locationName:"jobOutput" type:"structure"` + + // The time at which the batch inference job was last updated. + LastUpdatedDateTime *time.Time `locationName:"lastUpdatedDateTime" type:"timestamp"` + + // The number of recommendations generated by the batch inference job. This + // number includes the error messages generated for failed input records. + NumResults *int64 `locationName:"numResults" type:"integer"` + + // The ARN of the Amazon Identity and Access Management (IAM) role that requested + // the batch inference job. + RoleArn *string `locationName:"roleArn" type:"string"` + + // The Amazon Resource Name (ARN) of the solution version from which the batch + // inference job was created. + SolutionVersionArn *string `locationName:"solutionVersionArn" type:"string"` + + // The status of the batch inference job. The status is one of the following + // values: + // + // * PENDING + // + // * IN PROGRESS + // + // * ACTIVE + // + // * CREATE FAILED + Status *string `locationName:"status" type:"string"` +} + +// String returns the string representation +func (s BatchInferenceJob) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchInferenceJob) GoString() string { + return s.String() +} + +// SetBatchInferenceJobArn sets the BatchInferenceJobArn field's value. +func (s *BatchInferenceJob) SetBatchInferenceJobArn(v string) *BatchInferenceJob { + s.BatchInferenceJobArn = &v + return s +} + +// SetCreationDateTime sets the CreationDateTime field's value. +func (s *BatchInferenceJob) SetCreationDateTime(v time.Time) *BatchInferenceJob { + s.CreationDateTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *BatchInferenceJob) SetFailureReason(v string) *BatchInferenceJob { + s.FailureReason = &v + return s +} + +// SetJobInput sets the JobInput field's value. +func (s *BatchInferenceJob) SetJobInput(v *BatchInferenceJobInput) *BatchInferenceJob { + s.JobInput = v + return s +} + +// SetJobName sets the JobName field's value. +func (s *BatchInferenceJob) SetJobName(v string) *BatchInferenceJob { + s.JobName = &v + return s +} + +// SetJobOutput sets the JobOutput field's value. +func (s *BatchInferenceJob) SetJobOutput(v *BatchInferenceJobOutput) *BatchInferenceJob { + s.JobOutput = v + return s +} + +// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. +func (s *BatchInferenceJob) SetLastUpdatedDateTime(v time.Time) *BatchInferenceJob { + s.LastUpdatedDateTime = &v + return s +} + +// SetNumResults sets the NumResults field's value. +func (s *BatchInferenceJob) SetNumResults(v int64) *BatchInferenceJob { + s.NumResults = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *BatchInferenceJob) SetRoleArn(v string) *BatchInferenceJob { + s.RoleArn = &v + return s +} + +// SetSolutionVersionArn sets the SolutionVersionArn field's value. +func (s *BatchInferenceJob) SetSolutionVersionArn(v string) *BatchInferenceJob { + s.SolutionVersionArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *BatchInferenceJob) SetStatus(v string) *BatchInferenceJob { + s.Status = &v + return s +} + +// The input configuration of a batch inference job. +type BatchInferenceJobInput struct { + _ struct{} `type:"structure"` + + // The URI of the Amazon S3 location that contains your input data. The Amazon + // S3 bucket must be in the same region as the API endpoint you are calling. + // + // S3DataSource is a required field + S3DataSource *S3DataConfig `locationName:"s3DataSource" type:"structure" required:"true"` +} + +// String returns the string representation +func (s BatchInferenceJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchInferenceJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchInferenceJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchInferenceJobInput"} + if s.S3DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataSource")) + } + if s.S3DataSource != nil { + if err := s.S3DataSource.Validate(); err != nil { + invalidParams.AddNested("S3DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataSource sets the S3DataSource field's value. +func (s *BatchInferenceJobInput) SetS3DataSource(v *S3DataConfig) *BatchInferenceJobInput { + s.S3DataSource = v + return s +} + +// The output configuration parameters of a batch inference job. +type BatchInferenceJobOutput struct { + _ struct{} `type:"structure"` + + // Information on the Amazon S3 bucket in which the batch inference job's output + // is stored. + // + // S3DataDestination is a required field + S3DataDestination *S3DataConfig `locationName:"s3DataDestination" type:"structure" required:"true"` +} + +// String returns the string representation +func (s BatchInferenceJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchInferenceJobOutput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchInferenceJobOutput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchInferenceJobOutput"} + if s.S3DataDestination == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataDestination")) + } + if s.S3DataDestination != nil { + if err := s.S3DataDestination.Validate(); err != nil { + invalidParams.AddNested("S3DataDestination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataDestination sets the S3DataDestination field's value. +func (s *BatchInferenceJobOutput) SetS3DataDestination(v *S3DataConfig) *BatchInferenceJobOutput { + s.S3DataDestination = v + return s +} + +// A truncated version of the BatchInferenceJob datatype. The ListBatchInferenceJobs +// operation returns a list of batch inference job summaries. +type BatchInferenceJobSummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the batch inference job. + BatchInferenceJobArn *string `locationName:"batchInferenceJobArn" type:"string"` + + // The time at which the batch inference job was created. + CreationDateTime *time.Time `locationName:"creationDateTime" type:"timestamp"` + + // If the batch inference job failed, the reason for the failure. + FailureReason *string `locationName:"failureReason" type:"string"` + + // The name of the batch inference job. + JobName *string `locationName:"jobName" min:"1" type:"string"` + + // The time at which the batch inference job was last updated. + LastUpdatedDateTime *time.Time `locationName:"lastUpdatedDateTime" type:"timestamp"` + + // The status of the batch inference job. The status is one of the following + // values: + // + // * PENDING + // + // * IN PROGRESS + // + // * ACTIVE + // + // * CREATE FAILED + Status *string `locationName:"status" type:"string"` +} + +// String returns the string representation +func (s BatchInferenceJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchInferenceJobSummary) GoString() string { + return s.String() +} + +// SetBatchInferenceJobArn sets the BatchInferenceJobArn field's value. +func (s *BatchInferenceJobSummary) SetBatchInferenceJobArn(v string) *BatchInferenceJobSummary { + s.BatchInferenceJobArn = &v + return s +} + +// SetCreationDateTime sets the CreationDateTime field's value. +func (s *BatchInferenceJobSummary) SetCreationDateTime(v time.Time) *BatchInferenceJobSummary { + s.CreationDateTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *BatchInferenceJobSummary) SetFailureReason(v string) *BatchInferenceJobSummary { + s.FailureReason = &v + return s } -// String returns the string representation -func (s AutoMLResult) String() string { - return awsutil.Prettify(s) +// SetJobName sets the JobName field's value. +func (s *BatchInferenceJobSummary) SetJobName(v string) *BatchInferenceJobSummary { + s.JobName = &v + return s } -// GoString returns the string representation -func (s AutoMLResult) GoString() string { - return s.String() +// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. +func (s *BatchInferenceJobSummary) SetLastUpdatedDateTime(v time.Time) *BatchInferenceJobSummary { + s.LastUpdatedDateTime = &v + return s } -// SetBestRecipeArn sets the BestRecipeArn field's value. -func (s *AutoMLResult) SetBestRecipeArn(v string) *AutoMLResult { - s.BestRecipeArn = &v +// SetStatus sets the Status field's value. +func (s *BatchInferenceJobSummary) SetStatus(v string) *BatchInferenceJobSummary { + s.Status = &v return s } @@ -4437,6 +5070,148 @@ func (s *ContinuousHyperParameterRange) SetName(v string) *ContinuousHyperParame return s } +type CreateBatchInferenceJobInput struct { + _ struct{} `type:"structure"` + + // The Amazon S3 path that leads to the input file to base your recommendations + // on. The input material must be in JSON format. + // + // JobInput is a required field + JobInput *BatchInferenceJobInput `locationName:"jobInput" type:"structure" required:"true"` + + // The name of the batch inference job to create. + // + // JobName is a required field + JobName *string `locationName:"jobName" min:"1" type:"string" required:"true"` + + // The path to the Amazon S3 bucket where the job's output will be stored. + // + // JobOutput is a required field + JobOutput *BatchInferenceJobOutput `locationName:"jobOutput" type:"structure" required:"true"` + + // The number of recommendations to retreive. + NumResults *int64 `locationName:"numResults" type:"integer"` + + // The ARN of the Amazon Identity and Access Management role that has permissions + // to read and write to your input and out Amazon S3 buckets respectively. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the solution version that will be used + // to generate the batch inference recommendations. + // + // SolutionVersionArn is a required field + SolutionVersionArn *string `locationName:"solutionVersionArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateBatchInferenceJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBatchInferenceJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBatchInferenceJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBatchInferenceJobInput"} + if s.JobInput == nil { + invalidParams.Add(request.NewErrParamRequired("JobInput")) + } + if s.JobName == nil { + invalidParams.Add(request.NewErrParamRequired("JobName")) + } + if s.JobName != nil && len(*s.JobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) + } + if s.JobOutput == nil { + invalidParams.Add(request.NewErrParamRequired("JobOutput")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.SolutionVersionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SolutionVersionArn")) + } + if s.JobInput != nil { + if err := s.JobInput.Validate(); err != nil { + invalidParams.AddNested("JobInput", err.(request.ErrInvalidParams)) + } + } + if s.JobOutput != nil { + if err := s.JobOutput.Validate(); err != nil { + invalidParams.AddNested("JobOutput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobInput sets the JobInput field's value. +func (s *CreateBatchInferenceJobInput) SetJobInput(v *BatchInferenceJobInput) *CreateBatchInferenceJobInput { + s.JobInput = v + return s +} + +// SetJobName sets the JobName field's value. +func (s *CreateBatchInferenceJobInput) SetJobName(v string) *CreateBatchInferenceJobInput { + s.JobName = &v + return s +} + +// SetJobOutput sets the JobOutput field's value. +func (s *CreateBatchInferenceJobInput) SetJobOutput(v *BatchInferenceJobOutput) *CreateBatchInferenceJobInput { + s.JobOutput = v + return s +} + +// SetNumResults sets the NumResults field's value. +func (s *CreateBatchInferenceJobInput) SetNumResults(v int64) *CreateBatchInferenceJobInput { + s.NumResults = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateBatchInferenceJobInput) SetRoleArn(v string) *CreateBatchInferenceJobInput { + s.RoleArn = &v + return s +} + +// SetSolutionVersionArn sets the SolutionVersionArn field's value. +func (s *CreateBatchInferenceJobInput) SetSolutionVersionArn(v string) *CreateBatchInferenceJobInput { + s.SolutionVersionArn = &v + return s +} + +type CreateBatchInferenceJobOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the batch inference job. + BatchInferenceJobArn *string `locationName:"batchInferenceJobArn" type:"string"` +} + +// String returns the string representation +func (s CreateBatchInferenceJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBatchInferenceJobOutput) GoString() string { + return s.String() +} + +// SetBatchInferenceJobArn sets the BatchInferenceJobArn field's value. +func (s *CreateBatchInferenceJobOutput) SetBatchInferenceJobArn(v string) *CreateBatchInferenceJobOutput { + s.BatchInferenceJobArn = &v + return s +} + type CreateCampaignInput struct { _ struct{} `type:"structure"` @@ -6478,6 +7253,67 @@ func (s *DescribeAlgorithmOutput) SetAlgorithm(v *Algorithm) *DescribeAlgorithmO return s } +type DescribeBatchInferenceJobInput struct { + _ struct{} `type:"structure"` + + // The ARN of the batch inference job to describe. + // + // BatchInferenceJobArn is a required field + BatchInferenceJobArn *string `locationName:"batchInferenceJobArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBatchInferenceJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBatchInferenceJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBatchInferenceJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBatchInferenceJobInput"} + if s.BatchInferenceJobArn == nil { + invalidParams.Add(request.NewErrParamRequired("BatchInferenceJobArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBatchInferenceJobArn sets the BatchInferenceJobArn field's value. +func (s *DescribeBatchInferenceJobInput) SetBatchInferenceJobArn(v string) *DescribeBatchInferenceJobInput { + s.BatchInferenceJobArn = &v + return s +} + +type DescribeBatchInferenceJobOutput struct { + _ struct{} `type:"structure"` + + // Information on the specified batch inference job. + BatchInferenceJob *BatchInferenceJob `locationName:"batchInferenceJob" type:"structure"` +} + +// String returns the string representation +func (s DescribeBatchInferenceJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBatchInferenceJobOutput) GoString() string { + return s.String() +} + +// SetBatchInferenceJob sets the BatchInferenceJob field's value. +func (s *DescribeBatchInferenceJobOutput) SetBatchInferenceJob(v *BatchInferenceJob) *DescribeBatchInferenceJobOutput { + s.BatchInferenceJob = v + return s +} + type DescribeCampaignInput struct { _ struct{} `type:"structure"` @@ -7669,6 +8505,95 @@ func (s *IntegerHyperParameterRange) SetName(v string) *IntegerHyperParameterRan return s } +type ListBatchInferenceJobsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of batch inference job results to return in each page. + // The default value is 100. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token to request the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The Amazon Resource Name (ARN) of the solution version from which the batch + // inference jobs were created. + SolutionVersionArn *string `locationName:"solutionVersionArn" type:"string"` +} + +// String returns the string representation +func (s ListBatchInferenceJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBatchInferenceJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBatchInferenceJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBatchInferenceJobsInput"} + 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 *ListBatchInferenceJobsInput) SetMaxResults(v int64) *ListBatchInferenceJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBatchInferenceJobsInput) SetNextToken(v string) *ListBatchInferenceJobsInput { + s.NextToken = &v + return s +} + +// SetSolutionVersionArn sets the SolutionVersionArn field's value. +func (s *ListBatchInferenceJobsInput) SetSolutionVersionArn(v string) *ListBatchInferenceJobsInput { + s.SolutionVersionArn = &v + return s +} + +type ListBatchInferenceJobsOutput struct { + _ struct{} `type:"structure"` + + // A list containing information on each job that is returned. + BatchInferenceJobs []*BatchInferenceJobSummary `locationName:"batchInferenceJobs" type:"list"` + + // The token to use to retreive the next page of results. The value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBatchInferenceJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBatchInferenceJobsOutput) GoString() string { + return s.String() +} + +// SetBatchInferenceJobs sets the BatchInferenceJobs field's value. +func (s *ListBatchInferenceJobsOutput) SetBatchInferenceJobs(v []*BatchInferenceJobSummary) *ListBatchInferenceJobsOutput { + s.BatchInferenceJobs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBatchInferenceJobsOutput) SetNextToken(v string) *ListBatchInferenceJobsOutput { + s.NextToken = &v + return s +} + type ListCampaignsInput struct { _ struct{} `type:"structure"` @@ -8604,6 +9529,56 @@ func (s *RecipeSummary) SetStatus(v string) *RecipeSummary { return s } +// The configuration details of an Amazon S3 input or output bucket. +type S3DataConfig struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon Key Management Service (KMS) + // key that Amazon Personalize uses to encrypt or decrypt the input and output + // files of a batch inference job. + KmsKeyArn *string `locationName:"kmsKeyArn" type:"string"` + + // The file path of the Amazon S3 bucket. + // + // Path is a required field + Path *string `locationName:"path" type:"string" required:"true"` +} + +// String returns the string representation +func (s S3DataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3DataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3DataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3DataConfig"} + if s.Path == nil { + invalidParams.Add(request.NewErrParamRequired("Path")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *S3DataConfig) SetKmsKeyArn(v string) *S3DataConfig { + s.KmsKeyArn = &v + return s +} + +// SetPath sets the Path field's value. +func (s *S3DataConfig) SetPath(v string) *S3DataConfig { + s.Path = &v + return s +} + // An object that provides information about a solution. A solution is a trained // model that can be deployed as a campaign. type Solution struct { @@ -8768,9 +9743,7 @@ type SolutionConfig struct { // Lists the feature transformation parameters. FeatureTransformationParameters map[string]*string `locationName:"featureTransformationParameters" type:"map"` - // Describes the properties for hyperparameter optimization (HPO). For use with - // the bring-your-own-recipe feature. Not used with Amazon Personalize predefined - // recipes. + // Describes the properties for hyperparameter optimization (HPO). HpoConfig *HPOConfig `locationName:"hpoConfig" type:"structure"` } 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 8da137df86d..e85726fe6f9 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 @@ -156,10 +156,12 @@ func (c *Pricing) DescribeServicesPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeServicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeServicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -307,10 +309,12 @@ func (c *Pricing) GetAttributeValuesPagesWithContext(ctx aws.Context, input *Get }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetAttributeValuesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetAttributeValuesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -455,10 +459,12 @@ func (c *Pricing) GetProductsPagesWithContext(ctx aws.Context, input *GetProduct }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetProductsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetProductsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3d8a1410880..a332e1d761c 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 @@ -846,10 +846,12 @@ func (c *QLDB) ListJournalS3ExportsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJournalS3ExportsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJournalS3ExportsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -980,10 +982,12 @@ func (c *QLDB) ListJournalS3ExportsForLedgerPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJournalS3ExportsForLedgerOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJournalS3ExportsForLedgerOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1114,10 +1118,12 @@ func (c *QLDB) ListLedgersPagesWithContext(ctx aws.Context, input *ListLedgersIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLedgersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLedgersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 9d84d4fb2c1..459ec84ca34 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 @@ -787,10 +787,12 @@ func (c *RAM) GetResourcePoliciesPagesWithContext(ctx aws.Context, input *GetRes }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -940,10 +942,12 @@ func (c *RAM) GetResourceShareAssociationsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceShareAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourceShareAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1093,10 +1097,12 @@ func (c *RAM) GetResourceShareInvitationsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceShareInvitationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourceShareInvitationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1244,10 +1250,12 @@ func (c *RAM) GetResourceSharesPagesWithContext(ctx aws.Context, input *GetResou }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetResourceSharesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetResourceSharesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1404,10 +1412,12 @@ func (c *RAM) ListPendingInvitationResourcesPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPendingInvitationResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPendingInvitationResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1555,10 +1565,12 @@ func (c *RAM) ListPrincipalsPagesWithContext(ctx aws.Context, input *ListPrincip }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPrincipalsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPrincipalsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1709,10 +1721,12 @@ func (c *RAM) ListResourcesPagesWithContext(ctx aws.Context, input *ListResource }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 331f16db603..f34121026ad 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 @@ -4296,10 +4296,12 @@ func (c *RDS) DescribeCustomAvailabilityZonesPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeCustomAvailabilityZonesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeCustomAvailabilityZonesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4953,10 +4955,12 @@ func (c *RDS) DescribeDBClustersPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5083,10 +5087,12 @@ func (c *RDS) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5224,10 +5230,12 @@ func (c *RDS) DescribeDBInstanceAutomatedBackupsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstanceAutomatedBackupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBInstanceAutomatedBackupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5359,10 +5367,12 @@ func (c *RDS) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5494,10 +5504,12 @@ func (c *RDS) DescribeDBLogFilesPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBLogFilesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBLogFilesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5631,10 +5643,12 @@ func (c *RDS) DescribeDBParameterGroupsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5766,10 +5780,12 @@ func (c *RDS) DescribeDBParametersPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5903,10 +5919,12 @@ func (c *RDS) DescribeDBSecurityGroupsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6128,10 +6146,12 @@ func (c *RDS) DescribeDBSnapshotsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSnapshotsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBSnapshotsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6266,10 +6286,12 @@ func (c *RDS) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6475,10 +6497,12 @@ func (c *RDS) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6691,10 +6715,12 @@ func (c *RDS) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6825,10 +6851,12 @@ func (c *RDS) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEve }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6965,10 +6993,12 @@ func (c *RDS) DescribeGlobalClustersPagesWithContext(ctx aws.Context, input *Des }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeGlobalClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeGlobalClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7101,10 +7131,12 @@ func (c *RDS) DescribeInstallationMediaPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstallationMediaOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInstallationMediaOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7231,10 +7263,12 @@ func (c *RDS) DescribeOptionGroupOptionsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOptionGroupOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOptionGroupOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7366,10 +7400,12 @@ func (c *RDS) DescribeOptionGroupsPagesWithContext(ctx aws.Context, input *Descr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOptionGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOptionGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7496,10 +7532,12 @@ func (c *RDS) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7712,10 +7750,12 @@ func (c *RDS) DescribeReservedDBInstancesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedDBInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedDBInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7847,10 +7887,12 @@ func (c *RDS) DescribeReservedDBInstancesOfferingsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedDBInstancesOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedDBInstancesOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8145,10 +8187,12 @@ func (c *RDS) DownloadDBLogFilePortionPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DownloadDBLogFilePortionOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DownloadDBLogFilePortionOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 de5136f63a3..ebb79a96e02 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 @@ -3162,10 +3162,12 @@ func (c *Redshift) DescribeClusterParameterGroupsPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterParameterGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterParameterGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3308,10 +3310,12 @@ func (c *Redshift) DescribeClusterParametersPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3463,10 +3467,12 @@ func (c *Redshift) DescribeClusterSecurityGroupsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSecurityGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterSecurityGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3618,10 +3624,12 @@ func (c *Redshift) DescribeClusterSnapshotsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSnapshotsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterSnapshotsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3769,10 +3777,12 @@ func (c *Redshift) DescribeClusterSubnetGroupsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterSubnetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterSubnetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3985,10 +3995,12 @@ func (c *Redshift) DescribeClusterVersionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClusterVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClusterVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4136,10 +4148,12 @@ func (c *Redshift) DescribeClustersPagesWithContext(ctx aws.Context, input *Desc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4270,10 +4284,12 @@ func (c *Redshift) DescribeDefaultClusterParametersPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeDefaultClusterParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeDefaultClusterParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4497,10 +4513,12 @@ func (c *Redshift) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4630,10 +4648,12 @@ func (c *Redshift) DescribeEventsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4780,10 +4800,12 @@ func (c *Redshift) DescribeHsmClientCertificatesPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHsmClientCertificatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeHsmClientCertificatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4930,10 +4952,12 @@ func (c *Redshift) DescribeHsmConfigurationsPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeHsmConfigurationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeHsmConfigurationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5150,10 +5174,12 @@ func (c *Redshift) DescribeNodeConfigurationOptionsPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeNodeConfigurationOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeNodeConfigurationOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5288,10 +5314,12 @@ func (c *Redshift) DescribeOrderableClusterOptionsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeOrderableClusterOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeOrderableClusterOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5439,10 +5467,12 @@ func (c *Redshift) DescribeReservedNodeOfferingsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedNodeOfferingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedNodeOfferingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5578,10 +5608,12 @@ func (c *Redshift) DescribeReservedNodesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeReservedNodesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeReservedNodesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 89989961e6e..84d3fee94ac 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 @@ -633,10 +633,12 @@ func (c *ResourceGroups) ListGroupResourcesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -781,10 +783,12 @@ func (c *ResourceGroups) ListGroupsPagesWithContext(ctx aws.Context, input *List }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -935,10 +939,12 @@ func (c *ResourceGroups) SearchResourcesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 1f39309a234..c17f25d357d 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 @@ -3983,10 +3983,12 @@ func (c *Route53) ListHealthChecksPagesWithContext(ctx aws.Context, input *ListH }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHealthChecksOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHealthChecksOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4130,10 +4132,12 @@ func (c *Route53) ListHostedZonesPagesWithContext(ctx aws.Context, input *ListHo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHostedZonesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHostedZonesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4555,10 +4559,12 @@ func (c *Route53) ListResourceRecordSetsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourceRecordSetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResourceRecordSetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 11a3f163c8e..3e1dc08be48 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 @@ -1297,10 +1297,12 @@ func (c *Route53Resolver) ListResolverEndpointIpAddressesPagesWithContext(ctx aw }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverEndpointIpAddressesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResolverEndpointIpAddressesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1445,10 +1447,12 @@ func (c *Route53Resolver) ListResolverEndpointsPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResolverEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1593,10 +1597,12 @@ func (c *Route53Resolver) ListResolverRuleAssociationsPagesWithContext(ctx aws.C }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverRuleAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResolverRuleAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1740,10 +1746,12 @@ func (c *Route53Resolver) ListResolverRulesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResolverRulesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResolverRulesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 04a928640ce..a979c59f1bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -4246,10 +4246,12 @@ func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4376,10 +4378,12 @@ func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObje }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4513,10 +4517,12 @@ func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4651,10 +4657,12 @@ func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2 }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4781,10 +4789,12 @@ func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, f }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) { + break + } } + return p.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 f50a7d64cc0..9ec8ca04541 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 @@ -475,10 +475,12 @@ func (c *S3Control) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 29e70ae97eb..3a9ea70adc4 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 @@ -3867,10 +3867,12 @@ func (c *SageMaker) ListCompilationJobsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCompilationJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCompilationJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3997,10 +3999,12 @@ func (c *SageMaker) ListEndpointConfigsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointConfigsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEndpointConfigsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4127,10 +4131,12 @@ func (c *SageMaker) ListEndpointsPagesWithContext(ctx aws.Context, input *ListEn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4258,10 +4264,12 @@ func (c *SageMaker) ListHyperParameterTuningJobsPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListHyperParameterTuningJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListHyperParameterTuningJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4388,10 +4396,12 @@ func (c *SageMaker) ListLabelingJobsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLabelingJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLabelingJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4523,10 +4533,12 @@ func (c *SageMaker) ListLabelingJobsForWorkteamPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLabelingJobsForWorkteamOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLabelingJobsForWorkteamOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4728,10 +4740,12 @@ func (c *SageMaker) ListModelsPagesWithContext(ctx aws.Context, input *ListModel }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListModelsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListModelsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4859,10 +4873,12 @@ func (c *SageMaker) ListNotebookInstanceLifecycleConfigsPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNotebookInstanceLifecycleConfigsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNotebookInstanceLifecycleConfigsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4990,10 +5006,12 @@ func (c *SageMaker) ListNotebookInstancesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNotebookInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNotebookInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5122,10 +5140,12 @@ func (c *SageMaker) ListSubscribedWorkteamsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscribedWorkteamsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSubscribedWorkteamsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5252,10 +5272,12 @@ func (c *SageMaker) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5382,10 +5404,12 @@ func (c *SageMaker) ListTrainingJobsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTrainingJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTrainingJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5518,10 +5542,12 @@ func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobPagesWithContext(c }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTrainingJobsForHyperParameterTuningJobOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTrainingJobsForHyperParameterTuningJobOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5648,10 +5674,12 @@ func (c *SageMaker) ListTransformJobsPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTransformJobsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTransformJobsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5780,10 +5808,12 @@ func (c *SageMaker) ListWorkteamsPagesWithContext(ctx aws.Context, input *ListWo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkteamsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWorkteamsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5990,10 +6020,12 @@ func (c *SageMaker) SearchPagesWithContext(ctx aws.Context, input *SearchInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 b002302edc0..f4233729fa4 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 @@ -1173,10 +1173,12 @@ func (c *SecretsManager) ListSecretVersionIdsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1333,10 +1335,12 @@ func (c *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 f402a069940..53ea5acaef2 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 @@ -1282,10 +1282,12 @@ func (c *SecurityHub) DescribeActionTargetsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeActionTargetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeActionTargetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1523,10 +1525,12 @@ func (c *SecurityHub) DescribeProductsPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeProductsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeProductsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2336,10 +2340,12 @@ func (c *SecurityHub) GetFindingsPagesWithContext(ctx aws.Context, input *GetFin }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetFindingsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetFindingsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2578,10 +2584,12 @@ func (c *SecurityHub) GetInsightsPagesWithContext(ctx aws.Context, input *GetIns }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetInsightsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetInsightsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3098,10 +3106,12 @@ func (c *SecurityHub) ListEnabledProductsForImportPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEnabledProductsForImportOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEnabledProductsForImportOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 1639d64fe0d..ee652493001 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 @@ -906,10 +906,12 @@ func (c *ServerlessApplicationRepository) ListApplicationDependenciesPagesWithCo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationDependenciesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationDependenciesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1056,10 +1058,12 @@ func (c *ServerlessApplicationRepository) ListApplicationVersionsPagesWithContex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationVersionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationVersionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1202,10 +1206,12 @@ func (c *ServerlessApplicationRepository) ListApplicationsPagesWithContext(ctx a }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3083863c8fd..7fd6793ab7a 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 @@ -4466,10 +4466,12 @@ func (c *ServiceCatalog) ListAcceptedPortfolioSharesPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAcceptedPortfolioSharesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAcceptedPortfolioSharesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4604,10 +4606,12 @@ func (c *ServiceCatalog) ListBudgetsForResourcePagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListBudgetsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListBudgetsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4742,10 +4746,12 @@ func (c *ServiceCatalog) ListConstraintsForPortfolioPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListConstraintsForPortfolioOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListConstraintsForPortfolioOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4882,10 +4888,12 @@ func (c *ServiceCatalog) ListLaunchPathsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListLaunchPathsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListLaunchPathsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5024,10 +5032,12 @@ func (c *ServiceCatalog) ListOrganizationPortfolioAccessPagesWithContext(ctx aws }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOrganizationPortfolioAccessOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOrganizationPortfolioAccessOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5238,10 +5248,12 @@ func (c *ServiceCatalog) ListPortfoliosPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPortfoliosOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPortfoliosOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5376,10 +5388,12 @@ func (c *ServiceCatalog) ListPortfoliosForProductPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPortfoliosForProductOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPortfoliosForProductOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5514,10 +5528,12 @@ func (c *ServiceCatalog) ListPrincipalsForPortfolioPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPrincipalsForPortfolioOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPrincipalsForPortfolioOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5819,10 +5835,12 @@ func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPagesWithConte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListProvisioningArtifactsForServiceActionOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListProvisioningArtifactsForServiceActionOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6041,10 +6059,12 @@ func (c *ServiceCatalog) ListResourcesForTagOptionPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListResourcesForTagOptionOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListResourcesForTagOptionOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6176,10 +6196,12 @@ func (c *ServiceCatalog) ListServiceActionsPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceActionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServiceActionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6315,10 +6337,12 @@ func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPagesWithConte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceActionsForProvisioningArtifactOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServiceActionsForProvisioningArtifactOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6539,10 +6563,12 @@ func (c *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6930,10 +6956,12 @@ func (c *ServiceCatalog) SearchProductsPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProductsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchProductsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7068,10 +7096,12 @@ func (c *ServiceCatalog) SearchProductsAsAdminPagesWithContext(ctx aws.Context, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProductsAsAdminOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchProductsAsAdminOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7203,10 +7233,12 @@ func (c *ServiceCatalog) SearchProvisionedProductsPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SearchProvisionedProductsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SearchProvisionedProductsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 66ec55240a8..796c561766d 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 @@ -1005,10 +1005,12 @@ func (c *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1401,10 +1403,12 @@ func (c *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1539,10 +1543,12 @@ func (c *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1676,10 +1682,12 @@ func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1814,10 +1822,12 @@ func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 82f88b31bd3..efc3cf18659 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 @@ -991,10 +991,12 @@ func (c *ServiceQuotas) ListAWSDefaultServiceQuotasPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAWSDefaultServiceQuotasOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAWSDefaultServiceQuotasOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1142,10 +1144,12 @@ func (c *ServiceQuotas) ListRequestedServiceQuotaChangeHistoryPagesWithContext(c }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRequestedServiceQuotaChangeHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRequestedServiceQuotaChangeHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1296,10 +1300,12 @@ func (c *ServiceQuotas) ListRequestedServiceQuotaChangeHistoryByQuotaPagesWithCo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListRequestedServiceQuotaChangeHistoryByQuotaOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListRequestedServiceQuotaChangeHistoryByQuotaOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1455,10 +1461,12 @@ func (c *ServiceQuotas) ListServiceQuotaIncreaseRequestsInTemplatePagesWithConte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceQuotaIncreaseRequestsInTemplateOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServiceQuotaIncreaseRequestsInTemplateOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1614,10 +1622,12 @@ func (c *ServiceQuotas) ListServiceQuotasPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServiceQuotasOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServiceQuotasOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1764,10 +1774,12 @@ func (c *ServiceQuotas) ListServicesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index d2b4340785f..5a2bc39fdbc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -3188,10 +3188,12 @@ func (c *SES) ListCustomVerificationEmailTemplatesPagesWithContext(ctx aws.Conte }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCustomVerificationEmailTemplatesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCustomVerificationEmailTemplatesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3322,10 +3324,12 @@ func (c *SES) ListIdentitiesPagesWithContext(ctx aws.Context, input *ListIdentit }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListIdentitiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListIdentitiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 4696345998b..dfc0e5d41d4 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 @@ -976,10 +976,12 @@ func (c *SFN) GetExecutionHistoryPagesWithContext(ctx aws.Context, input *GetExe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetExecutionHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetExecutionHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1120,10 +1122,12 @@ func (c *SFN) ListActivitiesPagesWithContext(ctx aws.Context, input *ListActivit }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActivitiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListActivitiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1271,10 +1275,12 @@ func (c *SFN) ListExecutionsPagesWithContext(ctx aws.Context, input *ListExecuti }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListExecutionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListExecutionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1415,10 +1421,12 @@ func (c *SFN) ListStateMachinesPagesWithContext(ctx aws.Context, input *ListStat }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStateMachinesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListStateMachinesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go index efa04ba80d6..a00895099ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go @@ -838,10 +838,12 @@ func (c *SimpleDB) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomai }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1134,10 +1136,12 @@ func (c *SimpleDB) SelectPagesWithContext(ctx aws.Context, input *SelectInput, f }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*SelectOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*SelectOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index 477d52e0faf..94783de2c2b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -1499,10 +1499,12 @@ func (c *SNS) ListEndpointsByPlatformApplicationPagesWithContext(ctx aws.Context }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListEndpointsByPlatformApplicationOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListEndpointsByPlatformApplicationOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1746,10 +1748,12 @@ func (c *SNS) ListPlatformApplicationsPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListPlatformApplicationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListPlatformApplicationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1892,10 +1896,12 @@ func (c *SNS) ListSubscriptionsPagesWithContext(ctx aws.Context, input *ListSubs }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscriptionsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSubscriptionsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2041,10 +2047,12 @@ func (c *SNS) ListSubscriptionsByTopicPagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListSubscriptionsByTopicOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListSubscriptionsByTopicOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2281,10 +2289,12 @@ func (c *SNS) ListTopicsPagesWithContext(ctx aws.Context, input *ListTopicsInput }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTopicsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTopicsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 8695fea0547..767f80602d2 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 @@ -2434,10 +2434,12 @@ func (c *SSM) DescribeActivationsPagesWithContext(ctx aws.Context, input *Descri }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3597,10 +3599,12 @@ func (c *SSM) DescribeInstanceInformationPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4866,10 +4870,12 @@ func (c *SSM) DescribeParametersPagesWithContext(ctx aws.Context, input *Describ }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -6865,10 +6871,12 @@ func (c *SSM) GetParameterHistoryPagesWithContext(ctx aws.Context, input *GetPar }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7111,10 +7119,12 @@ func (c *SSM) GetParametersByPathPagesWithContext(ctx aws.Context, input *GetPar }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7722,10 +7732,12 @@ func (c *SSM) ListAssociationsPagesWithContext(ctx aws.Context, input *ListAssoc }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -7881,10 +7893,12 @@ func (c *SSM) ListCommandInvocationsPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8036,10 +8050,12 @@ func (c *SSM) ListCommandsPagesWithContext(ctx aws.Context, input *ListCommandsI }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCommandsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListCommandsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -8447,10 +8463,12 @@ func (c *SSM) ListDocumentsPagesWithContext(ctx aws.Context, input *ListDocument }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -13071,16 +13089,21 @@ func (s *AttachmentInformation) SetName(v string) *AttachmentInformation { return s } -// A key and value pair that identifies the location of an attachment to a document. +// Identifying information about a document attachment, including the file name +// and a key-value pair that identifies the location of an attachment to a document. type AttachmentsSource struct { _ struct{} `type:"structure"` - // The key of a key and value pair that identifies the location of an attachment + // The key of a key-value pair that identifies the location of an attachment // to a document. Key *string `type:"string" enum:"AttachmentsSourceKey"` - // The URL of the location of a document attachment, such as the URL of an Amazon - // S3 bucket. + // The name of the document attachment file. + Name *string `type:"string"` + + // The value of a key-value pair that identifies the location of an attachment + // to a document. The format is the URL of the location of a document attachment, + // such as the URL of an Amazon S3 bucket. Values []*string `min:"1" type:"list"` } @@ -13113,6 +13136,12 @@ func (s *AttachmentsSource) SetKey(v string) *AttachmentsSource { return s } +// SetName sets the Name field's value. +func (s *AttachmentsSource) SetName(v string) *AttachmentsSource { + s.Name = &v + return s +} + // SetValues sets the Values field's value. func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource { s.Values = v @@ -26696,7 +26725,7 @@ type ListCommandInvocationsInput struct { Details *bool `type:"boolean"` // (Optional) One or more filters. Use a filter to return a more specific list - // of results. + // of results. Note that the DocumentName filter is not supported for ListCommandInvocations. Filters []*CommandFilter `min:"1" type:"list"` // (Optional) The command execution details for a specific instance ID. @@ -31373,7 +31402,7 @@ func (s PutComplianceItemsOutput) GoString() string { type PutInventoryInput struct { _ struct{} `type:"structure"` - // One or more instance IDs where you want to add or update inventory items. + // An instance ID where you want to add or update inventory items. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` @@ -34739,8 +34768,16 @@ func (s *Tag) SetValue(v string) *Tag { // * Key=tag-key,Values=Name,Instance-Type,CostCenter // // * (Maintenance window targets only) Key=resource-groups:Name,Values=ProductionResourceGroup +// This example demonstrates how to target all resources in the resource +// 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. +// +// * (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 @@ -37091,6 +37128,9 @@ const ( const ( // AttachmentsSourceKeySourceUrl is a AttachmentsSourceKey enum value AttachmentsSourceKeySourceUrl = "SourceUrl" + + // AttachmentsSourceKeyS3fileUrl is a AttachmentsSourceKey enum value + AttachmentsSourceKeyS3fileUrl = "S3FileUrl" ) const ( 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 e140815a3d9..59410b750da 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 @@ -3416,10 +3416,12 @@ func (c *StorageGateway) DescribeTapeArchivesPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapeArchivesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTapeArchivesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3562,10 +3564,12 @@ func (c *StorageGateway) DescribeTapeRecoveryPointsPagesWithContext(ctx aws.Cont }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapeRecoveryPointsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTapeRecoveryPointsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3705,10 +3709,12 @@ func (c *StorageGateway) DescribeTapesPagesWithContext(ctx aws.Context, input *D }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeTapesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeTapesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -3936,10 +3942,12 @@ func (c *StorageGateway) DescribeVTLDevicesPagesWithContext(ctx aws.Context, inp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeVTLDevicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeVTLDevicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4434,10 +4442,12 @@ func (c *StorageGateway) ListFileSharesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFileSharesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFileSharesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4584,10 +4594,12 @@ func (c *StorageGateway) ListGatewaysPagesWithContext(ctx aws.Context, input *Li }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListGatewaysOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListGatewaysOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4818,10 +4830,12 @@ func (c *StorageGateway) ListTagsForResourcePagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -4968,10 +4982,12 @@ func (c *StorageGateway) ListTapesPagesWithContext(ctx aws.Context, input *ListT }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTapesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTapesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -5296,10 +5312,12 @@ func (c *StorageGateway) ListVolumesPagesWithContext(ctx aws.Context, input *Lis }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListVolumesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListVolumesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 74bea04bc45..864d2401090 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 @@ -1355,10 +1355,12 @@ func (c *SWF) GetWorkflowExecutionHistoryPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1516,10 +1518,12 @@ func (c *SWF) ListActivityTypesPagesWithContext(ctx aws.Context, input *ListActi }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1682,10 +1686,12 @@ func (c *SWF) ListClosedWorkflowExecutionsPagesWithContext(ctx aws.Context, inpu }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1840,10 +1846,12 @@ func (c *SWF) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInp }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2006,10 +2014,12 @@ func (c *SWF) ListOpenWorkflowExecutionsPagesWithContext(ctx aws.Context, input }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2252,10 +2262,12 @@ func (c *SWF) ListWorkflowTypesPagesWithContext(ctx aws.Context, input *ListWork }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2554,10 +2566,12 @@ func (c *SWF) PollForDecisionTaskPagesWithContext(ctx aws.Context, input *PollFo }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 8088bea141f..8f5c78af454 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 @@ -917,10 +917,12 @@ func (c *Transfer) ListServersPagesWithContext(ctx aws.Context, input *ListServe }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListServersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListServersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1063,10 +1065,12 @@ func (c *Transfer) ListTagsForResourcePagesWithContext(ctx aws.Context, input *L }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1212,10 +1216,12 @@ func (c *Transfer) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersIn }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 3a4f223f37a..337f6a89afc 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 @@ -1638,10 +1638,12 @@ func (c *WorkLink) ListDevicesPagesWithContext(ctx aws.Context, input *ListDevic }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1782,10 +1784,12 @@ func (c *WorkLink) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomai }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1926,10 +1930,12 @@ func (c *WorkLink) ListFleetsPagesWithContext(ctx aws.Context, input *ListFleets }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListFleetsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListFleetsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2074,10 +2080,12 @@ func (c *WorkLink) ListWebsiteAuthorizationProvidersPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWebsiteAuthorizationProvidersOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWebsiteAuthorizationProvidersOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -2219,10 +2227,12 @@ func (c *WorkLink) ListWebsiteCertificateAuthoritiesPagesWithContext(ctx aws.Con }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListWebsiteCertificateAuthoritiesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*ListWebsiteCertificateAuthoritiesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 a785c950d76..cc276d42831 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 @@ -1371,10 +1371,12 @@ func (c *WorkSpaces) DescribeWorkspaceBundlesPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspaceBundlesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeWorkspaceBundlesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1507,10 +1509,12 @@ func (c *WorkSpaces) DescribeWorkspaceDirectoriesPagesWithContext(ctx aws.Contex }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspaceDirectoriesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeWorkspaceDirectoriesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1813,10 +1817,12 @@ func (c *WorkSpaces) DescribeWorkspacesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } 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 7bfd327681a..a8aa010a6c6 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 @@ -146,10 +146,12 @@ func (c *XRay) BatchGetTracesPagesWithContext(ctx aws.Context, input *BatchGetTr }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*BatchGetTracesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*BatchGetTracesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -786,10 +788,12 @@ func (c *XRay) GetGroupsPagesWithContext(ctx aws.Context, input *GetGroupsInput, }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetGroupsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetGroupsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -924,10 +928,12 @@ func (c *XRay) GetSamplingRulesPagesWithContext(ctx aws.Context, input *GetSampl }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSamplingRulesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetSamplingRulesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1062,10 +1068,12 @@ func (c *XRay) GetSamplingStatisticSummariesPagesWithContext(ctx aws.Context, in }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetSamplingStatisticSummariesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetSamplingStatisticSummariesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1286,10 +1294,12 @@ func (c *XRay) GetServiceGraphPagesWithContext(ctx aws.Context, input *GetServic }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetServiceGraphOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetServiceGraphOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1424,10 +1434,12 @@ func (c *XRay) GetTimeSeriesServiceStatisticsPagesWithContext(ctx aws.Context, i }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTimeSeriesServiceStatisticsOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTimeSeriesServiceStatisticsOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1562,10 +1574,12 @@ func (c *XRay) GetTraceGraphPagesWithContext(ctx aws.Context, input *GetTraceGra }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTraceGraphOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTraceGraphOutput), !p.HasNextPage()) { + break + } } + return p.Err() } @@ -1716,10 +1730,12 @@ func (c *XRay) GetTraceSummariesPagesWithContext(ctx aws.Context, input *GetTrac }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*GetTraceSummariesOutput), !p.HasNextPage()) + for p.Next() { + if !fn(p.Page().(*GetTraceSummariesOutput), !p.HasNextPage()) { + break + } } + return p.Err() } diff --git a/vendor/modules.txt b/vendor/modules.txt index a68cf3e01ec..5c8afb71a06 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -21,7 +21,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.25.34 +# github.com/aws/aws-sdk-go v1.25.35 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/awserr @@ -125,6 +125,7 @@ github.com/aws/aws-sdk-go/service/gamelift github.com/aws/aws-sdk-go/service/glacier github.com/aws/aws-sdk-go/service/globalaccelerator github.com/aws/aws-sdk-go/service/glue +github.com/aws/aws-sdk-go/service/greengrass github.com/aws/aws-sdk-go/service/guardduty github.com/aws/aws-sdk-go/service/iam github.com/aws/aws-sdk-go/service/inspector diff --git a/website/docs/guides/custom-service-endpoints.html.md b/website/docs/guides/custom-service-endpoints.html.md index 83fee007483..f1a3e85985f 100644 --- a/website/docs/guides/custom-service-endpoints.html.md +++ b/website/docs/guides/custom-service-endpoints.html.md @@ -109,6 +109,7 @@ The Terraform AWS Provider allows the following endpoints to be customized: - `globalaccelerator` - `glue` - `guardduty` +- `greengrass` - `iam` - `inspector` - `iot` diff --git a/website/docs/r/dlm_lifecycle_policy.markdown b/website/docs/r/dlm_lifecycle_policy.markdown index 6f883bd8381..e5157107c68 100644 --- a/website/docs/r/dlm_lifecycle_policy.markdown +++ b/website/docs/r/dlm_lifecycle_policy.markdown @@ -106,6 +106,7 @@ The following arguments are supported: * `execution_role_arn` - (Required) The ARN of an IAM role that is able to be assumed by the DLM service. * `policy_details` - (Required) See the [`policy_details` configuration](#policy-details-arguments) block. Max of 1. * `state` - (Optional) Whether the lifecycle policy should be enabled or disabled. `ENABLED` or `DISABLED` are valid values. Defaults to `ENABLED`. +* `tags` - (Optional) Key-value mapping of resource tags. #### Policy Details arguments @@ -135,7 +136,10 @@ The following arguments are supported: ## Attributes Reference -All of the arguments above are exported as attributes. +In addition to all arguments above, the following attributes are exported: + +* `arn` - Amazon Resource Name (ARN) of the DLM Lifecycle Policy. +* `id` - Identifier of the DLM Lifecycle Policy. ## Import diff --git a/website/docs/r/glue_crawler.html.markdown b/website/docs/r/glue_crawler.html.markdown index 0500062cd34..285292e4c5b 100644 --- a/website/docs/r/glue_crawler.html.markdown +++ b/website/docs/r/glue_crawler.html.markdown @@ -101,8 +101,9 @@ The following arguments are supported: * `s3_target` (Optional) List nested Amazon S3 target arguments. See below. * `schedule` (Optional) A cron expression used to specify the schedule. For more information, see [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html). For example, to run something every day at 12:15 UTC, you would specify: `cron(15 12 * * ? *)`. * `schema_change_policy` (Optional) Policy for the crawler's update and deletion behavior. -* `table_prefix` (Optional) The table prefix used for catalog tables that are created. * `security_configuration` (Optional) The name of Security Configuration to be used by the crawler +* `table_prefix` (Optional) The table prefix used for catalog tables that are created. +* `tags` - (Optional) Key-value mapping of resource tags ### dynamodb_target Argument Reference